; Disassembly of the file "D:\Game Tech\Test Equipment\Fluke\128c900+1+2.rom"
; 
; CPU Type: Z80
; 
; Created with dZ80 1.50
; 
; on Thursday, 07 of February 2002 at 10:56 PM
; 
        org     $0000

l0000:  ld      ix,l0000
l0004:  jr      l006a                   ; (+$64)
        ld      hl,($c3f4)
        add     a,(hl)
        ld      a,(hl)
        xor     (hl)
        jp      (hl)
        jp      lb353
l0010:  jp      l7f1a
        inc     d
        pop     af
        jp      lb184
l0018:  jp      lbe46
        ld      e,a
        di      
        jp      l8851
l0020:  jp      lbe77
        ld      a,$f1
        jp      l8b1d
l0028:  jp      l8112
        ld      h,b
        pop     af
        jp      l92f6
l0030:  jp      lbe68
        sub     (hl)
        inc     b
        jp      l93be
l0038:  jp      lb915
        push    hl
        ld      hl,($f42a)
        add     hl,bc
        ex      (sp),hl
        ret     

        push    hl
        ld      hl,($f42a)
        add     hl,de
        ex      (sp),hl
        ret     

        push    hl
        push    bc
        ld      bc,($f42a)
        add     hl,bc
        pop     bc
        ex      (sp),hl
        ret     

        exx     
        ret     p

        ld      e,(hl)
        pop     af
        ld      sp,$47f3
        di      
        ld      c,a
        di      
        jp      l736f
        jp      l947f
        jp      l425d
        ld      ix,$0001
l006a:  jr      l00de                   ; (+$72)
        ld      l,c
        jp      (hl)
        ld      b,b
        pop     af
        jp      l7fc5
        cp      b
        ret     p

        cp      d
        ret     p

        cp      (hl)
        ret     p

        pop     bc
        ret     p

        jp      c,l13f0
        pop     af
        dec     d
        pop     af
        ld      hl,$26f1
        pop     af
        daa     
        pop     af
        inc     (hl)
        pop     af
        dec     (hl)
l008a:  pop     af
        add     hl,sp
        pop     af
        ld      d,(hl)
        pop     af
        ld      e,a
        pop     af
        pop     hl
        jp      p,lf328
        ld      ($33f3),a
        di      
        scf     
        di      
        jp      la6f1
        jp      lb920
        jp      lba2d
        jp      lbb1d
        jp      lbd3e
        jp      lb96c
        jp      lbb91
        jp      lb4b7
        jp      lb54c
        jp      l784c
        jp      l7395
        jp      la3cd
        jp      l04ab
        jp      l767c
        jp      l8ec3
        jp      l92a2
        jp      l9513
        jp      l99ab
        jp      l7f65
        jp      l8623
        jp      l81ba
        and     c
        pop     af
        and     $f2
l00de:  in      a,($81)
        in      a,($e2)
        ex      af,af'
        ld      a,$30
        out     ($c1),a
        ld      a,$f9
        out     ($c0),a
        ld      a,$34
        out     ($c1),a
        ld      a,$34
        out     ($c3),a
        ld      a,$99
        out     ($c0),a
        ld      a,$3c
        out     ($c3),a
        ld      a,$ff
        ld      ($c000),a
        ld      hl,$c000
        ld      de,$c001
        ld      bc,$3fff
        ldir    
        ld      hl,$c000
        ld      bc,$4000
l0111:  cpi     
        jr      nz,l011a                ; (+$05)
        jp      po,l011f
        jr      l0111                   ; (-$09)
l011a:  ld      bc,l0002
        add     ix,bc
l011f:  ld      a,$00
        ld      ($c000),a
        ld      hl,$c000
        ld      de,$c001
        ld      bc,$3fff
        ldir    
        ld      hl,$c000
        ld      bc,$4000
l0135:  cpi     
        jr      nz,l013e                ; (+$05)
        jp      po,l0143
        jr      l0135                   ; (-$09)
l013e:  ld      bc,l0004
        add     ix,bc
l0143:  ld      sp,l0000
        push    ix
        pop     hl
        ex      af,af'
        ld      ($f0b8),a
        call    l01f1
l0150:  ld      bc,$bffe
        ld      de,l0000
        ld      hl,l0000
l0159:  ld      a,e
        add     a,(hl)
        ld      e,a
        ld      a,$00
        adc     a,d
        ld      d,a
        inc     hl
        dec     bc
        ld      a,c
        or      b
        jr      nz,l0159                ; (-$0d)
        ld      bc,($bffe)
        ex      de,hl
        add     hl,bc
        ld      c,l
        ld      b,h
        ret     

        ld      l,d
        ld      e,(hl)
        dec     d
        ld      a,$15
        ld      a,$15
        ld      a,$d1
        jr      l01da                   ; (+$60)
        ld      a,(de)
        adc     a,l
        add     hl,de
        adc     a,l
        add     hl,de
        adc     a,l
        add     hl,de
        adc     a,l
        add     hl,de
        ld      e,l
        ld      e,e
        nop     
        ld      e,e
        nop     
        nop     
        ld      h,(hl)
        ld      e,d
        nop     
        nop     
        dec     l
        ld      b,$7d
        rlca    
        ld      d,d
        add     hl,bc
        ld      d,d
        ex      af,af'
        ld      h,$0a
        rst     $08
l0198:  ld      a,(bc)
        nop     
        nop     
        nop     
        nop     
        nop     
        nop     
        inc     e
        jr      l01e8                   ; (+$46)
        dec     a
        ld      e,c
        inc     c
l01a5:  or      (hl)
        ld      c,$ec
        ld      c,$64
        rrca    
        nop     
        nop     
        nop     
        nop     
        nop     
        nop     
        nop     
        nop     
        ld      c,e
        jr      c,l0201                 ; (+$4b)
        jr      c,l0203                 ; (+$4b)
        jr      c,l0205                 ; (+$4b)
        jr      c,l0207                 ; (+$4b)
        jr      c,l0198                 ; (-$26)
        djnz    l01a5                   ; (-$1b)
        scf     
        ld      e,l
        ld      b,d
        ld      l,d
        ld      d,l
        ld      l,d
        ld      d,l
        push    bc
        ld      b,e
        sub     d
        add     hl,sp
        ld      c,h
        inc     de
        sub     b
        ld      b,l
        nop     
        nop     
        nop     
        nop     
        nop     
        nop     
        nop     
        nop     
        push    hl
        scf     
        ld      l,d
l01da:  jr      l01dc                   ; (+$00)
l01dc:  nop     
        nop     
        nop     
        nop     
        nop     
        nop     
        nop     
        nop     
        nop     
        nop     
        nop     
        nop     
l01e8:  nop     
        nop     
        nop     
        nop     
        nop     
        sub     e
        jr      l0215                   ; (+$25)
l01f0:  rla     
l01f1:  rst     $20
        ld      hl,$fff5
        add     hl,sp
        ld      sp,hl
        ld      l,(ix+$04)
        call    l055b
l01fd:  ld      l,$11
        call    l7395
        ld      a,($f116)
l0205:  or      a
        jr      z,l022a                 ; (+$22)
        ld      l,$17
        call    l767c
        ld      a,c
        or      a
        jr      z,l022a                 ; (+$19)
        ld      a,($f126)
        cp      $28
        jr      nz,l024d                ; (+$35)
        ld      l,$08
        call    lb136
        ld      a,$7f
        ld      ($f126),a
        call    l181c
        ld      l,$08
        call    lb11f
l022a:  ld      a,($f140)
        cp      $02
        jp      nz,l02f5
        ld      a,($f125)
        ld      (ix-$0b),a
        ld      a,($f127)
        cp      $1d
        jr      z,l0284                 ; (+$45)
        ld      a,($f127)
        cp      $1a
        jr      z,l0284                 ; (+$3e)
        ld      a,$01
        ld      ($f125),a
        jr      l0284                   ; (+$37)
l024d:  ld      a,($f0b7)
        cp      $10
        jr      z,l027a                 ; (+$26)
        ld      a,($f0b7)
        ld      c,a
        sub     a
        ld      b,a
        ld      l,c
        ld      h,b
        add     hl,hl
        add     hl,hl
        ld      bc,$f160
        add     hl,bc
        sub     a
        ld      (hl),a
        inc     hl
        ld      (hl),a
        ld      a,($f126)
        inc     hl
        ld      (hl),a
        sub     a
        inc     hl
        ld      (hl),a
        ld      a,$10
        ld      ($f0b7),a
        ld      a,$7f
        ld      ($f126),a
        jr      l022a                   ; (-$50)
l027a:  call    l736f
        ld      a,$7f
        ld      ($f126),a
        jr      l022a                   ; (-$5a)
l0284:  ld      hl,$f127
        ld      a,$0f
        cp      (hl)
        jp      c,l02f5
        sub     a
        ld      ($f125),a
        ld      a,($f42a)
        ld      (ix-$0a),a
        ld      a,($f42b)
        ld      (ix-$09),a
l029d:  ld      l,(ix-$0a)
        ld      h,(ix-$09)
        ld      a,(hl)
        ld      (ix-$07),a
        ld      a,(ix-$07)
        cp      $50
        jr      z,l02d6                 ; (+$28)
        ld      a,(ix-$07)
        cp      $2b
        jr      nz,l02ea                ; (+$35)
        ld      l,(ix-$0a)
        ld      h,(ix-$09)
        inc     hl
        ld      a,($f127)
        ld      c,a
        ld      a,(hl)
        cp      c
        jr      nz,l02ea                ; (+$26)
        ld      l,(ix-$0a)
        ld      h,(ix-$09)
        inc     hl
        inc     hl
        ld      ($f35d),hl
        ld      a,$1a
        ld      ($f127),a
        jr      l02f5                   ; (+$1f)
l02d6:  ld      a,($f127)
        or      a
        jr      nz,l0309                ; (+$2d)
        ld      hl,($f42a)
        inc     hl
        ld      ($f35d),hl
        ld      a,$1a
        ld      ($f127),a
        jr      l0309                   ; (+$1f)
l02ea:  inc     (ix-$0a)
        jr      nz,l02f2                ; (+$03)
        inc     (ix-$09)
l02f2:  jp      l029d
l02f5:  ld      hl,$f127
        ld      a,$0f
        cp      (hl)
        jr      c,l0325                 ; (+$28)
        call    l736f
        ld      a,(ix-$0b)
        ld      ($f125),a
        jp      l01fd
l0309:  ld      a,($f127)
        cp      $0f
        jr      nz,l02f5                ; (-$1b)
        ld      hl,($f34d)
        ld      ($f355),hl
        call    l9b5f
        ld      l,c
        ld      h,b
        ld      ($f35d),hl
        ld      a,$1b
        ld      ($f127),a
        jr      l02f5                   ; (-$30)
l0325:  ld      a,($f127)
        add     a,a
        ld      l,a
        ld      c,l
        sub     a
        ld      b,a
        ld      l,c
        ld      h,b
        ld      bc,$014f
        add     hl,bc
        ld      a,(hl)
        inc     hl
        ld      h,(hl)
        ld      l,a
        call    lbe71
        jp      l01fd
        nop     
        nop     
        ld      bc,l0000
        nop     
        ld      (bc),a
        nop     
        nop     
        nop     
        inc     b
        nop     
        nop     
        nop     
        ex      af,af'
        nop     
        nop     
        nop     
        djnz    l0351                   ; (+$00)
l0351:  nop     
        nop     
        jr      nz,l0355                ; (+$00)
l0355:  nop     
        nop     
        ld      b,b
        nop     
        nop     
        nop     
        add     a,b
        nop     
        nop     
        nop     
        nop     
        ld      bc,l0000
        nop     
        ld      (bc),a
        nop     
        nop     
        nop     
        inc     b
        nop     
        nop     
        nop     
        ex      af,af'
        nop     
        nop     
        nop     
        djnz    l0372                   ; (+$00)
l0372:  nop     
        nop     
        jr      nz,l0376                ; (+$00)
l0376:  nop     
        nop     
        ld      b,b
        nop     
        nop     
        nop     
        add     a,b
        ld      bc,l0000
        nop     
        ld      (bc),a
        nop     
        nop     
        nop     
        inc     b
        nop     
        nop     
        nop     
        ex      af,af'
        nop     
        nop     
        nop     
        djnz    l038f                   ; (+$00)
l038f:  nop     
        nop     
        jr      nz,l0393                ; (+$00)
l0393:  nop     
        nop     
        ld      b,b
        nop     
        nop     
        nop     
        add     a,b
        nop     
        nop     
        nop     
        nop     
        ld      bc,l0000
        nop     
        ld      (bc),a
        nop     
        nop     
        nop     
        inc     b
        nop     
        nop     
        nop     
        ex      af,af'
        nop     
        nop     
        nop     
        djnz    l03b0                   ; (+$00)
l03b0:  nop     
        nop     
        jr      nz,l03b4                ; (+$00)
l03b4:  nop     
        nop     
        ld      b,b
        nop     
        nop     
        nop     
        add     a,b
        nop     
        nop     
        nop     
        nop     
        ld      bc,l0000
        nop     
        inc     bc
        nop     
        nop     
        nop     
        rlca    
        nop     
        nop     
        nop     
        rrca    
        nop     
        nop     
        nop     
        rra     
        nop     
        nop     
        nop     
        ccf     
        nop     
        nop     
        nop     
        ld      a,a
        nop     
        nop     
        nop     
        rst     $38
        nop     
        nop     
        nop     
        rst     $38
        ld      bc,l0000
        rst     $38
        inc     bc
        nop     
        nop     
        rst     $38
        rlca    
        nop     
        nop     
        rst     $38
        rrca    
        nop     
        nop     
        rst     $38
        rra     
        nop     
        nop     
        rst     $38
        ccf     
        nop     
        nop     
        rst     $38
        ld      a,a
        nop     
        nop     
        rst     $38
        rst     $38
        ld      bc,$ff00
        rst     $38
        inc     bc
        nop     
        rst     $38
        rst     $38
        rlca    
        nop     
        rst     $38
        rst     $38
        rrca    
        nop     
        rst     $38
        rst     $38
        rra     
        nop     
        rst     $38
        rst     $38
        ccf     
        nop     
        rst     $38
        rst     $38
        ld      a,a
        nop     
        rst     $38
        rst     $38
        rst     $38
        nop     
        rst     $38
        rst     $38
        rst     $38
        ld      bc,$ffff
        rst     $38
        inc     bc
        rst     $38
        rst     $38
        rst     $38
        rlca    
        rst     $38
        rst     $38
        rst     $38
        rrca    
        rst     $38
        rst     $38
        rst     $38
        rra     
        rst     $38
        rst     $38
        rst     $38
        ccf     
        rst     $38
        rst     $38
        rst     $38
        ld      a,a
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        nop     
        nop     
        nop     
        nop     
        adc     a,d
        inc     b
        ld      a,a
        inc     b
        halt    
        inc     b
        ld      l,a
        inc     b
        ld      h,(hl)
        inc     b
        ld      e,l
        inc     b
        ld      d,e
        inc     b
        ld      c,h
        ld      c,c
        ld      c,(hl)
        ld      b,l
        ld      d,e
        ld      c,c
        ld      e,d
        ld      b,l
        jr      nz,l045d                ; (+$00)
l045d:  ld      c,(hl)
        ld      b,l
        ld      d,a
        ld      c,h
        ld      c,c
        ld      c,(hl)
        ld      b,l
        jr      nz,l0466                ; (+$00)
l0466:  ld      d,l
        ld      c,(hl)
        ld      d,e
        ld      d,h
        ld      b,c
        ld      c,h
        ld      c,h
        jr      nz,l046f                ; (+$00)
l046f:  ld      d,e
        ld      d,h
        ld      b,c
        ld      c,h
        ld      c,h
        jr      nz,l0476                ; (+$00)
l0476:  ld      d,h
        ld      c,c
        ld      c,l
        ld      b,l
        ld      c,a
        ld      d,l
        ld      d,h
        jr      nz,l047f                ; (+$00)
l047f:  ld      d,d
        ld      d,l
        ld      c,(hl)
        jr      nz,l04d9                ; (+$55)
        ld      d,l
        ld      d,h
        jr      nz,l04c8                ; (+$40)
        jr      nz,l048a                ; (+$00)
l048a:  ld      b,d
        ld      d,l
        ld      d,e
        jr      nz,l04e3                ; (+$54)
        ld      b,l
        ld      d,e
        ld      d,h
        jr      nz,l04d4                ; (+$40)
        jr      nz,l0496                ; (+$00)
l0496:  ld      a,(l0000)
        ld      a,(bc)
        dec     c
        nop     
        nop     
        ld      c,a
        nop     
        nop     
        nop     
        inc     de
        nop     
        nop     
        nop     
        ret     z

        nop     
        nop     
        nop     
        ld      de,$f700
        ld      hl,$f0ba
        push    hl
        ld      hl,$0497
        push    hl
        rst     $18
        pop     af
        ld      a,$01
        ld      ($f0be),a
        sub     a
        ld      ($f0da),a
        ld      ($f113),a
        ld      a,$01
        ld      ($f115),a
        sub     a
l04c8:  ld      ($f13e),a
        ld      a,$ef
        ld      ($f114),a
        ld      hl,$f135
        push    hl
l04d4:  ld      hl,$049b
        push    hl
        rst     $18
l04d9:  pop     af
        ld      hl,lf328
        push    hl
        ld      hl,$049f
        push    hl
        rst     $18
l04e3:  pop     af
        ld      hl,lf333
        push    hl
        ld      hl,$04a3
        push    hl
        rst     $18
        pop     af
        ld      hl,$f337
        push    hl
        ld      hl,$04a7
        push    hl
        rst     $18
        pop     af
        sub     a
        ld      ($f34f),a
        ld      a,$c0
        ld      ($f350),a
        ld      hl,$00c8
        push    hl
        ld      hl,$f35f
        call    lb8c3
        ld      hl,$0100
        push    hl
        ld      hl,$e800
        call    lb8c3
        sub     a
        ld      ($f157),a
        call    l9513
        jp      lbe72
        ld      c,a
        ld      c,e
        jr      nz,l0543                ; (+$20)
        ld      d,(hl)
        ld      b,l
        ld      d,d
        dec     l
        nop     
        ld      b,(hl)
        ld      b,c
        ld      c,c
        ld      c,h
        jr      nz,l054e                ; (+$20)
        nop     
        jr      nz,l0584                ; (+$53)
        ld      b,l
        ld      c,h
        ld      b,(hl)
        dec     l
        ld      d,h
        ld      b,l
        ld      d,e
        ld      d,h
        nop     
        ld      d,b
        ld      c,a
        ld      d,a
        ld      b,l
        ld      d,d
        dec     l
        ld      d,l
        ld      d,b
        jr      nz,l0544                ; (+$00)
l0544:  ld      d,d
        ld      b,l
        ld      d,e
        ld      d,h
        ld      b,c
        ld      d,d
        ld      d,h
        ld      b,l
        ld      b,h
        jr      nz,l054f                ; (+$00)
l054f:  ld      b,(hl)
        ld      c,h
        ld      d,l
        ld      c,e
        ld      b,l
        jr      nz,l058f                ; (+$39)
        jr      nc,l0588                ; (+$30)
        jr      nc,l057a                ; (+$20)
        nop     
l055b:  rst     $20
        ld      l,$e0
        call    lb54c
        ld      l,$58
        rst     $08
        ld      l,$71
        rst     $08
        ld      hl,l054f
        rst     $28
        ld      l,(ix+$04)
        bit     0,l
        jr      z,l0578                 ; (+$06)
        ld      hl,l0544
        rst     $28
        jr      l057c                   ; (+$04)
l0578:  ld      hl,$053a
        rst     $28
l057c:  ld      hl,$052f
        rst     $28
        ld      l,$72
        rst     $08
        call    l0150
        ld      a,c
        or      b
l0588:  jr      z,l0592                 ; (+$08)
        ld      a,(ix+$04)
        or      $08
l058f:  ld      (ix+$04),a
l0592:  ld      l,$71
        rst     $08
        ld      l,$5d
        rst     $08
        ld      l,(ix+$04)
        ld      a,l
        and     $0e
        jr      z,l05ac                 ; (+$0c)
        ld      hl,$0528
        rst     $28
        ld      a,(ix+$04)
        ld      ($f0c7),a
        jr      l05b6                   ; (+$0a)
l05ac:  ld      hl,$051f
        rst     $28
        ld      a,(l0496)
        ld      ($f0c7),a
l05b6:  ld      l,$02
        push    hl
        ld      l,$10
        push    hl
        ld      hl,$f0c5
        call    l7fc5
        ld      l,$72
        rst     $08
        call    l736f
        ld      hl,$f0d4
        push    hl
        ld      hl,$043d
        push    hl
        rst     $18
        pop     af
        ld      a,$01
        ld      ($f0d8),a
        ld      a,$08
        ld      ($f0d9),a
        ld      a,$7f
        ld      ($f126),a
        ld      hl,$f12c
        push    hl
        ld      hl,$0441
        push    hl
        rst     $18
        pop     af
        ld      hl,$f130
        push    hl
        ld      hl,$0441
        push    hl
        rst     $18
        pop     af
        ld      a,$01
        ld      ($f140),a
        ld      a,$0f
        ld      ($f15e),a
        ld      a,$80
        ld      ($f15f),a
        ld      a,$01
        ld      ($f1a0),a
        ld      a,$02
        ld      ($f331),a
        ld      a,($f0b8)
        and     $1f
        ld      l,a
        cp      $10
        jr      nz,l061c                ; (+$04)
        ld      c,$01
        jr      l061e                   ; (+$02)
l061c:  ld      c,$00
l061e:  ld      a,c
        ld      ($f0b8),a
        ld      l,$20
        call    lba5c
        call    l04ab
        jp      lbe84
        rst     $30
        push    af
        push    af
        push    af
        push    af
        ld      l,$58
        rst     $08
        ld      l,$1f
        rst     $10
        ld      l,$5b
        rst     $08
        ld      l,$17
        call    l7395
        ld      a,($f127)
        cp      $1e
        jr      nz,l065b                ; (+$14)
        ld      l,$5c
        rst     $08
        ld      l,$64
        rst     $10
        ld      l,$1e
        rst     $10
        ld      hl,$06b1
        ld      (ix-$08),l
        ld      (ix-$07),h
        jr      l0682                   ; (+$27)
l065b:  call    lb8e6
        ld      hl,$043d
        push    hl
        ld      hl,$0441
        push    hl
        ld      l,$00
        push    hl
        ld      l,$10
        push    hl
        ld      hl,$f19c
        call    l784c
        ld      a,c
        or      a
        jr      nz,l0679                ; (+$03)
        jp      lbe72
l0679:  ld      hl,$071e
        ld      (ix-$08),l
        ld      (ix-$07),h
l0682:  ld      a,($f140)
        cp      $02
        jr      z,l0692                 ; (+$09)
        ld      l,$62
        rst     $10
        ld      l,$60
        rst     $10
        ld      l,$78
        rst     $10
l0692:  ld      hl,l0000
        push    hl
        ld      l,(ix-$08)
        ld      h,(ix-$07)
        push    hl
        ld      a,($f140)
        cp      $03
        jr      nz,l06a8                ; (+$04)
        ld      c,$01
        jr      l06aa                   ; (+$02)
l06a8:  ld      c,$00
l06aa:  ld      l,c
        call    l8851
        jp      lbe72
        rst     $20
        ld      hl,$fff7
        add     hl,sp
        ld      sp,hl
        ld      a,($f114)
        ld      (ix-$08),a
        sub     a
        ld      ($f114),a
        ld      l,$08
        call    l8b1d
        ld      (ix-$07),c
        ld      a,(ix-$07)
        cp      $02
        jr      z,l06ea                 ; (+$1a)
        call    l7fb4
        ld      (ix-$09),c
        ld      a,(ix-$09)
        cp      $78
        jr      z,l06f6                 ; (+$19)
        ld      hl,$f190
        push    hl
        ld      hl,$f42c
        push    hl
        call    lbad9
        jr      nz,l06f6                ; (+$0c)
l06ea:  ld      a,(ix-$08)
        ld      ($f114),a
        ld      c,(ix-$07)
        jp      lbe84
l06f6:  ld      l,$71
        rst     $08
        ld      l,$59
        rst     $08
        ld      l,$21
        push    hl
        ld      l,$02
        push    hl
        ld      hl,$f190
        call    l7fc5
        ld      l,$63
        rst     $10
        ld      l,(ix-$09)
        rst     $10
        ld      l,$72
        rst     $08
        ld      hl,$f42c
        push    hl
        ld      hl,$f190
        push    hl
        rst     $18
        pop     af
        jr      l06ea                   ; (-$34)
        rst     $20
        push    af
        push    af
        push    af
        push    af
        ld      l,$05
        call    l8b1d
        ld      (ix-$07),c
        ld      a,(ix-$07)
        cp      $02
        jr      z,l074c                 ; (+$1a)
        call    l7fb4
        ld      (ix-$08),c
        ld      a,(ix-$08)
        cp      $78
        jr      z,l0752                 ; (+$13)
        ld      hl,$f198
        push    hl
        ld      hl,$f430
        push    hl
        call    lbad9
        jr      nz,l0752                ; (+$06)
l074c:  ld      c,(ix-$07)
        jp      lbe84
l0752:  ld      l,$71
        rst     $08
        ld      l,$59
        rst     $08
        ld      a,($f0d8)
        add     a,a
        ld      l,a
        push    hl
        ld      l,$10
        push    hl
        ld      hl,$f198
        call    l7fc5
        ld      l,$63
        rst     $10
        ld      l,(ix-$08)
        rst     $10
        ld      l,$72
        rst     $08
        ld      hl,$f430
        push    hl
        ld      hl,$f198
        push    hl
        rst     $18
        pop     af
        jr      l074c                   ; (-$31)
        rst     $30
        ld      hl,$fff4
        add     hl,sp
        ld      sp,hl
        ld      l,$58
        rst     $08
        ld      l,$5b
        rst     $08
        ld      l,$20
        rst     $10
        ld      l,$17
        call    l7395
        ld      a,($f127)
        cp      $1e
        jr      nz,l07bf                ; (+$27)
        ld      l,$5c
        rst     $08
        ld      l,$65
        rst     $10
        ld      l,$1e
        rst     $10
        ld      hl,$0840
        ld      (ix-$08),l
        ld      (ix-$07),h
        ld      hl,$f190
        ld      (ix-$0c),l
        ld      (ix-$0b),h
        ld      (ix-$09),$02
        ld      hl,$03d9
        ld      ($f434),hl
        jr      l07f9                   ; (+$3a)
l07bf:  call    lb8e6
        ld      hl,$043d
        push    hl
        ld      hl,$0441
        push    hl
        ld      l,$00
        push    hl
        ld      l,$10
        push    hl
        ld      hl,$f19c
        call    l784c
        ld      a,c
        or      a
        jr      nz,l07dd                ; (+$03)
        jp      lbe72
l07dd:  ld      hl,$0849
        ld      (ix-$08),l
        ld      (ix-$07),h
        ld      hl,$f198
        ld      (ix-$0c),l
        ld      (ix-$0b),h
        ld      (ix-$09),$10
        ld      hl,$f0d4
        ld      ($f434),hl
l07f9:  ld      l,$62
        rst     $10
        ld      hl,($f434)
        push    hl
        ld      hl,$0441
        push    hl
        ld      l,$00
        push    hl
        ld      l,(ix-$09)
        push    hl
        ld      l,(ix-$0c)
        ld      h,(ix-$0b)
        call    l784c
        ld      a,c
        or      a
        jr      z,l083d                 ; (+$25)
        ld      a,($f192)
        ld      ($f156),a
        ld      l,$7f
        rst     $10
        ld      hl,l0000
        push    hl
        ld      l,(ix-$08)
        ld      h,(ix-$07)
        push    hl
        ld      a,($f140)
        cp      $03
        jr      nz,l0837                ; (+$04)
        ld      c,$01
        jr      l0839                   ; (+$02)
l0837:  ld      c,$00
l0839:  ld      l,c
        call    l8851
l083d:  jp      lbe72
        rst     $20
        ld      l,$0a
        call    l8b1d
        jp      lbe84
        rst     $20
        ld      l,$03
        call    l8b1d
        jp      lbe84
        rst     $30
        ld      l,$58
        rst     $08
        ld      a,($f127)
        ld      l,a
        rst     $10
        ld      hl,$043d
        push    hl
        ld      hl,$0441
        push    hl
        ld      l,$00
        push    hl
        ld      l,$10
        push    hl
        ld      hl,$f19c
        call    l784c
        ld      a,c
        or      a
        jp      z,l08d2
        ld      l,$62
        rst     $10
        ld      a,($f0d9)
        add     a,$ff
        ld      l,a
        ld      ($f43a),a
        add     a,a
        sbc     a,a
        ld      ($f43b),a
        ld      hl,($f43a)
        add     hl,hl
        add     hl,hl
        ld      bc,$03bd
        add     hl,bc
        push    hl
        ld      hl,$0441
        push    hl
        ld      l,$00
        push    hl
        ld      l,$10
        push    hl
        ld      hl,$f198
        call    l784c
        ld      a,c
        or      a
        jr      z,l08d2                 ; (+$2f)
        ld      l,$7f
        rst     $10
        ld      hl,$f436
        push    hl
        ld      hl,($f43a)
        add     hl,hl
        add     hl,hl
        ld      bc,$033d
        add     hl,bc
        push    hl
        rst     $18
        pop     af
        ld      hl,l0000
        push    hl
        ld      hl,$08db
        push    hl
        ld      a,($f140)
        cp      $03
        jr      nz,l08c9                ; (+$04)
        ld      c,$01
        jr      l08cb                   ; (+$02)
l08c9:  ld      c,$00
l08cb:  ld      l,c
        call    l8851
        jp      lbe72
l08d2:  ld      c,$02
        jp      lbe72
        nop     
        nop     
        nop     
        nop     
        rst     $20
        ld      hl,$fff7
        add     hl,sp
        ld      sp,hl
        ld      (ix-$08),$00
        ld      (ix-$07),$00
l08e9:  ld      hl,$f0d9
        ld      a,(ix-$07)
        cp      (hl)
        jp      p,l0907
        ld      l,$03
        call    l8b1d
        ld      (ix-$09),c
        ld      a,(ix-$09)
        cp      $02
        jr      nz,l090d                ; (+$0b)
        ld      c,$02
        jp      lbe84
l0907:  ld      c,(ix-$08)
        jp      lbe84
l090d:  ld      a,(ix-$08)
        or      (ix-$09)
        ld      (ix-$08),a
        ld      hl,$f198
        push    hl
        ld      a,($f19a)
        and     $01
        jr      z,l092a                 ; (+$09)
        ld      hl,$f436
        ld      de,$f935
        rst     $38
        jr      l0931                   ; (+$07)
l092a:  ld      hl,$08d7
        ld      de,$f935
        rst     $38
l0931:  ld      hl,$f935
        push    hl
        ld      hl,$f198
        ld      de,$f93d
        rst     $38
        ld      hl,$f93d
        push    hl
        ld      hl,$0001
        push    hl
        call    lbd0f
        call    lbdd4
        rst     $18
        pop     af
        inc     (ix-$07)
        jp      l08e9
        rst     $30
        ld      l,$58
        rst     $08
        ld      a,($f127)
        ld      l,a
        rst     $10
        ld      hl,$043d
        push    hl
        ld      hl,$0441
        push    hl
        ld      l,$00
        push    hl
        ld      l,$10
        push    hl
        ld      hl,$f19c
        call    l784c
        ld      a,c
        or      a
        jr      z,l09a9                 ; (+$36)
        ld      l,$7f
        rst     $10
        ld      hl,$f43c
        push    hl
        ld      a,($f0d9)
        add     a,a
        add     a,a
        ld      l,a
        ld      c,a
        add     a,a
        sbc     a,a
        ld      b,a
        ld      l,c
        ld      h,b
        ld      bc,$03b9
        add     hl,bc
        push    hl
        rst     $18
        pop     af
        ld      hl,l0000
        push    hl
        ld      hl,$09ae
        push    hl
        ld      a,($f140)
        cp      $03
        jr      nz,l09a0                ; (+$04)
        ld      c,$01
        jr      l09a2                   ; (+$02)
l09a0:  ld      c,$00
l09a2:  ld      l,c
        call    l8851
        jp      lbe72
l09a9:  ld      c,$02
        jp      lbe72
        rst     $20
        push    af
        push    af
        push    af
        push    af
        ld      (ix-$07),$00
        sub     a
        ld      ($f198),a
        ld      ($f199),a
        ld      ($f19a),a
        ld      ($f19b),a
l09c4:  ld      l,$03
        call    l8b1d
        ld      (ix-$08),c
        ld      a,(ix-$08)
        cp      $02
        jr      z,l0a21                 ; (+$4e)
        ld      a,(ix-$07)
        or      (ix-$08)
        ld      (ix-$07),a
        ld      hl,$f43c
        push    hl
        ld      hl,$f198
        push    hl
        call    lbad9
        jr      nz,l09ef                ; (+$06)
        ld      c,(ix-$07)
        jp      lbe84
l09ef:  ld      hl,$f198
        push    hl
        ld      a,$00
        add     a,a
        sbc     a,a
        ld      ($f935),a
        ld      ($f936),a
        ld      a,$00
        ld      ($f938),a
        ld      a,$01
        ld      ($f937),a
        ld      hl,$f935
        push    hl
        call    lba62
        pop     af
        ld      a,($f19a)
        and     $1f
        jr      nz,l09c4                ; (-$52)
        ld      l,$01
        call    lb2ce
        ld      a,c
        cp      $02
        jp      nz,l09c4
l0a21:  ld      c,$02
        jp      lbe84
        rst     $30
        ld      l,$58
        rst     $08
        ld      l,$23
        rst     $10
        ld      hl,$043d
        push    hl
        ld      hl,$0441
        push    hl
        ld      l,$00
        push    hl
        ld      l,$10
        push    hl
        ld      hl,$f19c
        call    l784c
        ld      a,c
        or      a
        jp      z,l0a92
        ld      l,$6a
        rst     $10
        ld      a,$1f
        ld      ($f0c7),a
        ld      hl,$f0c5
        push    hl
        ld      hl,$0441
        push    hl
        ld      l,$00
        push    hl
        ld      l,$0a
        push    hl
        ld      hl,$f194
        call    l784c
        ld      a,c
        or      a
        jr      z,l0a92                 ; (+$2c)
        ld      l,$7f
        rst     $10
        ld      hl,$f33b
        push    hl
        ld      hl,($f196)
        add     hl,hl
l0a71:  add     hl,hl
        ld      bc,$033d
        add     hl,bc
        push    hl
        rst     $18
        pop     af
        ld      hl,l0000
        push    hl
        ld      hl,$0a95
        push    hl
        ld      a,($f140)
        cp      $03
        jr      nz,l0a8c                ; (+$04)
        ld      c,$01
        jr      l0a8e                   ; (+$02)
l0a8c:  ld      c,$00
l0a8e:  ld      l,c
        call    l8851
l0a92:  jp      lbe72
        rst     $20
        ld      hl,$fff9
        add     hl,sp
        ld      sp,hl
        ld      l,$05
        call    l8b1d
        ld      (ix-$07),c
        ld      a,(ix-$07)
        or      a
        jr      nz,l0ac9                ; (+$20)
        ld      hl,$f19c
        push    hl
        ld      hl,$f33b
        push    hl
        call    lbe23
        pop     af
        ld      l,$05
        call    l8b1d
        ld      (ix-$07),c
        ld      hl,$f19c
        push    hl
        ld      hl,$f33b
        push    hl
        call    lbe23
        pop     af
l0ac9:  ld      c,(ix-$07)
        jp      lbe84
        rst     $30
        ld      hl,$fff4
        add     hl,sp
        ld      sp,hl
        ld      l,$58
        rst     $08
        ld      l,$24
        rst     $10
        ld      l,$5b
        rst     $08
        ld      l,$17
        call    l7395
        ld      a,($f127)
        cp      $1e
        jr      nz,l0b16                ; (+$2c)
        ld      l,$5c
        rst     $08
        ld      l,$65
        rst     $10
        ld      l,$1e
        rst     $10
        ld      hl,$0bc9
        ld      (ix-$08),l
        ld      (ix-$07),h
        ld      hl,$f190
        ld      (ix-$0c),l
        ld      (ix-$0b),h
        ld      (ix-$09),$02
        ld      hl,$03d9
        ld      ($f440),hl
        ld      a,$07
        ld      ($f0c7),a
        jr      l0b5a                   ; (+$44)
l0b16:  call    lb8e6
        ld      hl,$043d
        push    hl
        ld      hl,$0441
        push    hl
        ld      l,$00
        push    hl
        ld      l,$10
        push    hl
        ld      hl,$f19c
        call    l784c
        ld      a,c
        or      a
        jr      nz,l0b34                ; (+$03)
        jp      lbe72
l0b34:  ld      hl,$0bfb
        ld      (ix-$08),l
        ld      (ix-$07),h
        ld      hl,$f198
        ld      (ix-$0c),l
        ld      (ix-$0b),h
        ld      (ix-$09),$10
        ld      hl,$f0d4
        ld      ($f440),hl
        ld      a,($f0d9)
        add     a,$ff
        ld      l,a
        ld      a,l
        ld      ($f0c7),a
l0b5a:  ld      l,$62
        rst     $10
        ld      hl,($f440)
        push    hl
        ld      hl,$0441
        push    hl
        ld      l,$00
        push    hl
        ld      l,(ix-$09)
        push    hl
        ld      l,(ix-$0c)
        ld      h,(ix-$0b)
        call    l784c
        ld      a,c
        cp      $01
        jp      nz,l0bc6
        ld      l,$6a
        rst     $10
        ld      hl,$f0c5
        push    hl
        ld      hl,$0441
        push    hl
        ld      l,$00
        push    hl
        ld      l,$0a
        push    hl
        ld      hl,$f194
        call    l784c
        ld      a,c
        cp      $01
        jr      nz,l0bc6                ; (+$2f)
        ld      hl,$f33b
        push    hl
        ld      hl,($f196)
        add     hl,hl
        add     hl,hl
        ld      bc,$033d
        add     hl,bc
        push    hl
        rst     $18
        pop     af
        ld      l,$7f
        rst     $10
        ld      hl,l0000
        push    hl
        ld      l,(ix-$08)
        ld      h,(ix-$07)
        push    hl
        ld      a,($f140)
        cp      $03
        jr      nz,l0bc0                ; (+$04)
        ld      c,$01
        jr      l0bc2                   ; (+$02)
l0bc0:  ld      c,$00
l0bc2:  ld      l,c
        call    l8851
l0bc6:  jp      lbe72
        rst     $20
        ld      hl,$fff9
        add     hl,sp
        ld      sp,hl
        ld      a,($f192)
        ld      ($f156),a
        ld      l,$0a
        call    l8b1d
        ld      (ix-$07),c
        ld      a,(ix-$07)
        or      a
        jr      nz,l0bf5                ; (+$12)
        ld      hl,$f33d
        ld      a,($f156)
        xor     (hl)
        ld      ($f156),a
        ld      l,$0a
        call    l8b1d
        ld      (ix-$07),c
l0bf5:  ld      c,(ix-$07)
        jp      lbe84
        rst     $20
        ld      hl,$fff9
        add     hl,sp
        ld      sp,hl
        ld      l,$03
        call    l8b1d
        ld      (ix-$07),c
        ld      a,(ix-$07)
        or      a
        jr      nz,l0c2f                ; (+$20)
        ld      hl,$f198
        push    hl
        ld      hl,$f33b
        push    hl
        call    lbe23
        pop     af
        ld      l,$03
        call    l8b1d
        ld      (ix-$07),c
        ld      hl,$f198
        push    hl
        ld      hl,$f33b
        push    hl
        call    lbe23
        pop     af
l0c2f:  ld      c,(ix-$07)
        jp      lbe84
        jr      nz,l0c79                ; (+$42)
        ld      e,c
        ld      d,h
        ld      b,l
        ld      d,e
        nop     
        ld      b,e
        ld      d,d
        ld      b,l
        ld      b,c
        ld      d,h
        ld      b,l
        ld      b,h
        nop     
        ld      b,e
        ld      d,d
        ld      b,l
        ld      b,c
        ld      d,h
        ld      b,l
        jr      nz,l0c9c                ; (+$50)
        ld      d,d
        ld      c,a
        ld      b,a
        nop     
        ld      d,b
        ld      d,d
        ld      c,a
        ld      b,a
        ld      d,d
        ld      b,c
        ld      c,l
        jr      nz,l0c59                ; (+$00)
l0c59:  rst     $30
        ld      hl,$fff2
        add     hl,sp
        ld      sp,hl
        ld      l,$58
        rst     $08
        sub     a
        ld      ($f125),a
        ld      hl,($f34f)
        ld      ($f427),hl
        ld      a,($f140)
        cp      $01
        jr      nz,l0c8f                ; (+$1c)
        ld      hl,$0c50
        rst     $28
        ld      l,$5b
l0c79:  rst     $08
        ld      l,$17
        call    l7395
        ld      a,c
        or      a
        jr      nz,l0c92                ; (+$0f)
        ld      a,($f127)
        cp      $2f
        jr      nz,l0c95                ; (+$0b)
        call    la927
        jr      l0c92                   ; (+$03)
l0c8f:  call    l5be0
l0c92:  jp      lbe72
l0c95:  call    lb8e6
        ld      a,$63
        ld      ($f0c7),a
        ld      hl,$f0c5
        push    hl
        ld      hl,$0441
        push    hl
        ld      l,$04
        push    hl
        ld      l,$0a
        push    hl
        ld      hl,$f12c
        call    l784c
        ld      a,c
        cp      $01
        jr      nz,l0c92                ; (-$24)
        ld      a,($f12e)
        ld      ($f429),a
        ld      c,a
        add     a,a
        sbc     a,a
        ld      b,a
        ld      l,c
        ld      h,b
        add     hl,hl
        ld      bc,$f35f
        add     hl,bc
        ld      a,(hl)
        inc     hl
        or      (hl)
        jr      nz,l0ce6                ; (+$1a)
        ld      a,($f34f)
        sub     $cf
        ld      a,($f350)
        sbc     a,$e7
        jp      c,l0d69
        ld      l,$58
        rst     $08
        ld      l,$5f
        rst     $10
        ld      hl,$0c44
        rst     $28
        jp      lbe72
l0ce6:  ld      a,($f429)
        ld      c,a
        add     a,a
        sbc     a,a
        ld      b,a
        ld      l,c
        ld      h,b
        add     hl,hl
        ld      bc,$f35f
        add     hl,bc
        ld      a,(hl)
        inc     hl
        ld      h,(hl)
        ld      l,a
        ld      ($f42a),hl
        ld      a,($f429)
        ld      l,a
        call    l9b31
        ld      (ix-$0c),c
        ld      (ix-$0b),b
        ld      l,$71
        rst     $08
        ld      hl,($f42a)
        ld      a,(hl)
        ld      (ix-$08),a
        ld      l,(ix-$08)
        rst     $10
        ld      l,(ix-$0c)
        ld      h,(ix-$0b)
        ld      bc,($f42a)
        ld      a,l
        sub     c
        ld      l,a
        ld      a,h
        sbc     a,b
        ld      h,a
        ld      ($f349),hl
        sub     a
        ld      ($f347),a
        ld      ($f348),a
        ld      l,$01
        push    hl
        ld      l,$0a
        push    hl
        ld      hl,$f347
        call    l7fc5
        ld      hl,$0c35
        rst     $28
        ld      l,$72
        rst     $08
        ld      a,(ix-$08)
        cp      $51
        jp      nz,l0e13
l0d4b:  ld      l,$05
        call    l7395
        ld      a,($f127)
        cp      $1c
        jr      nz,l0d5c                ; (+$05)
        ld      bc,$0001
        jr      l0d5f                   ; (+$03)
l0d5c:  ld      bc,l0000
l0d5f:  ld      a,c
        or      b
        jp      z,l0e8d
        call    l736f
        jr      l0d4b                   ; (-$1e)
l0d69:  ld      a,($f429)
        ld      c,a
        add     a,a
        sbc     a,a
        ld      b,a
        ld      l,c
        ld      h,b
        add     hl,hl
        ld      bc,$f35f
        add     hl,bc
        push    hl
        ld      a,($f429)
        ld      l,a
        call    l9b31
        ld      (ix-$0e),c
        pop     hl
        ld      (ix-$0d),b
        ld      a,(ix-$0e)
        ld      (hl),a
        ld      a,(ix-$0d)
        inc     hl
        ld      (hl),a
        ld      l,(ix-$0e)
        ld      h,(ix-$0d)
        inc     hl
        inc     hl
        push    hl
        ld      hl,($f34f)
        ld      bc,$ffff
        add     hl,bc
        push    hl
        ld      l,(ix-$0e)
        ld      h,(ix-$0d)
        call    l9ad7
        ld      l,(ix-$0e)
        ld      h,(ix-$0d)
        inc     (ix-$0e)
        jr      nz,l0db7                ; (+$03)
        inc     (ix-$0d)
l0db7:  ld      (hl),$53
        ld      l,(ix-$0e)
        ld      h,(ix-$0d)
        ld      (hl),$50
        ld      a,($f429)
        inc     a
        ld      l,a
        ld      (ix-$09),l
l0dc9:  ld      a,(ix-$09)
        cp      $64
        jp      p,l0dfd
        ld      a,(ix-$09)
        ld      c,a
        add     a,a
        sbc     a,a
        ld      b,a
        ld      l,c
        ld      h,b
        add     hl,hl
        ld      bc,$f35f
        add     hl,bc
        ld      a,(hl)
        inc     hl
        or      (hl)
        jr      z,l0e0e                 ; (+$2a)
        ld      a,(ix-$09)
        ld      c,a
        add     a,a
        sbc     a,a
        ld      b,a
        ld      l,c
        ld      h,b
        add     hl,hl
        ld      bc,$f35f
        add     hl,bc
        ld      a,(hl)
        add     a,$02
        ld      (hl),a
        inc     hl
        ld      a,(hl)
        adc     a,$00
        ld      (hl),a
        jr      l0e0e                   ; (+$11)
l0dfd:  ld      hl,($f34f)
        inc     hl
        inc     hl
        ld      ($f34f),hl
        ld      ($f427),hl
        ld      hl,$0c3c
        rst     $28
        jr      l0e13                   ; (+$05)
l0e0e:  inc     (ix-$09)
        jr      l0dc9                   ; (-$4a)
l0e13:  ld      a,($f429)
        ld      c,a
        add     a,a
        sbc     a,a
        ld      b,a
        ld      l,c
        ld      h,b
        add     hl,hl
        ld      bc,$f35f
        add     hl,bc
        ld      a,(hl)
        inc     hl
        ld      h,(hl)
        ld      l,a
        ld      ($f42a),hl
        ld      ($f35d),hl
        inc     hl
        ld      ($f355),hl
        ld      hl,($f35d)
        call    l9b21
        ld      l,c
        ld      h,b
        ld      ($f34d),hl
        ld      a,($f429)
        ld      l,a
        call    l9b31
        ld      l,c
        ld      h,b
        ld      bc,$ffff
        add     hl,bc
        ld      ($f357),hl
        ld      hl,$e7ff
        ld      bc,($f34f)
        ld      de,($f357)
        ld      a,c
        sub     e
        ld      c,a
        ld      a,b
        sbc     a,d
        ld      b,a
        ld      a,l
        sub     c
        ld      l,a
        ld      a,h
        sbc     a,b
        ld      h,a
        inc     hl
        inc     hl
        ld      ($f35b),hl
        push    hl
        ld      hl,($f34f)
        ld      bc,$ffff
        add     hl,bc
        push    hl
        ld      hl,($f357)
        inc     hl
        call    l9ad7
        ld      hl,($f35b)
        ld      bc,$ffcf
        add     hl,bc
        ld      ($f353),hl
        ld      a,$02
        ld      ($f140),a
        ld      l,$02
        call    lb11f
        jp      l0c92
l0e8d:  ld      a,($f127)
        cp      $1d
        jr      nz,l0eb0                ; (+$1c)
        ld      hl,($f34f)
        ld      bc,$ffff
        add     hl,bc
        push    hl
        ld      l,(ix-$0c)
        ld      h,(ix-$0b)
        call    lab95
        ld      a,c
        or      a
        jr      nz,l0eb3                ; (+$0a)
        ld      a,$28
        ld      ($f126),a
        jr      l0eb3                   ; (+$03)
l0eb0:  call    lb8e6
l0eb3:  jp      lbe72
        rst     $30
        ld      l,$58
        rst     $08
        ld      a,($f140)
        cp      $02
        jr      nz,l0eda                ; (+$19)
        ld      l,$2b
        rst     $10
        ld      l,$5b
        rst     $08
        ld      l,$11
        call    l7395
        ld      a,c
        or      a
        jr      nz,l0ee4                ; (+$14)
        ld      a,($f127)
        ld      l,a
        rst     $10
        call    l9a22
        jr      l0ee7                   ; (+$0d)
l0eda:  ld      hl,($f359)
        inc     hl
        ld      ($f359),hl
l0ee1:  jp      lbe72
l0ee4:  call    lb8e6
l0ee7:  ld      l,$5c
        rst     $08
        jr      l0ee1                   ; (-$0b)
        rst     $30
        push    af
        push    af
        push    af
        push    af
        ld      l,$58
        rst     $08
        ld      a,($f140)
        cp      $02
        jr      nz,l0f14                ; (+$19)
        ld      l,$2c
        rst     $10
        ld      l,$5b
        rst     $08
        ld      l,$11
        call    l7395
        ld      a,c
        or      a
        jr      nz,l0f46                ; (+$3c)
        ld      a,($f127)
        ld      l,a
        rst     $10
        call    l9a22
        jr      l0f49                   ; (+$35)
l0f14:  ld      hl,($f359)
        ld      a,(hl)
        ld      ($f127),a
        ld      a,($f351)
        ld      (ix-$08),a
        ld      a,($f352)
        ld      (ix-$07),a
l0f27:  ld      l,(ix-$08)
        ld      h,(ix-$07)
        ld      a,($f127)
        ld      c,a
        ld      a,(hl)
        cp      c
        jr      z,l0f4e                 ; (+$19)
        ld      l,(ix-$08)
        ld      h,(ix-$07)
        inc     hl
        inc     hl
        inc     hl
        ld      (ix-$08),l
        ld      (ix-$07),h
        jr      l0f27                   ; (-$1f)
l0f46:  call    lb8e6
l0f49:  ld      l,$5c
        rst     $08
        jr      l0f61                   ; (+$13)
l0f4e:  ld      l,(ix-$08)
        ld      h,(ix-$07)
        inc     hl
        ld      a,(hl)
        inc     hl
        ld      h,(hl)
        ld      l,a
        ld      bc,($f42a)
        add     hl,bc
        ld      ($f359),hl
l0f61:  jp      lbe72
        rst     $30
        ld      hl,$fff4
        add     hl,sp
        ld      sp,hl
        ld      l,$58
        rst     $08
        ld      l,$2d
        rst     $10
l0f70:  ld      hl,$043d
        push    hl
        ld      hl,$0441
        push    hl
        ld      l,$09
        push    hl
        ld      l,$10
        push    hl
        ld      hl,$f343
        call    l784c
        ld      (ix-$07),c
        ld      a,(ix-$07)
        cp      $02
        jr      nz,l0f93                ; (+$05)
        call    l736f
        jr      l0f70                   ; (-$23)
l0f93:  ld      a,(ix-$07)
        cp      $01
        jr      nz,l0fbd                ; (+$23)
        ld      l,$5b
        rst     $08
        ld      a,($f127)
        cp      $2e
        jr      nz,l0fc0                ; (+$1c)
        ld      (ix-$0c),$01
        ld      l,$17
        call    l7395
        ld      a,($f127)
        cp      $2f
        jr      nz,l0fee                ; (+$3a)
        ld      l,$2f
        rst     $10
        ld      (ix-$0b),$01
        jr      l0fc8                   ; (+$0b)
l0fbd:  jp      lbe72
l0fc0:  ld      (ix-$0c),$00
        ld      (ix-$0b),$01
l0fc8:  ld      l,$63
        rst     $10
l0fcb:  ld      hl,$043d
        push    hl
        ld      hl,$0441
        push    hl
        ld      l,$0a
        push    hl
        ld      l,$10
        push    hl
        ld      hl,$f347
        call    l784c
        ld      (ix-$07),c
        ld      a,(ix-$07)
        cp      $02
        jr      nz,l0ff7                ; (+$0e)
        call    l736f
        jr      l0fcb                   ; (-$23)
l0fee:  call    lb8e6
        ld      (ix-$0b),$00
        jr      l0fc8                   ; (-$2f)
l0ff7:  ld      a,(ix-$07)
        cp      $01
        jp      nz,l0fbd
        ld      l,$5b
        rst     $08
        ld      l,$17
        call    l7395
        ld      a,($f127)
        and     $f0
        jr      nz,l1023                ; (+$15)
        ld      l,$5c
        rst     $08
        ld      a,($f127)
        ld      l,a
        rst     $10
        ld      a,($f140)
        cp      $02
        jr      nz,l1029                ; (+$0c)
        call    l9a22
        jp      l0fbd
l1023:  call    lb8e6
        jp      l0fbd
l1029:  ld      a,(ix-$0c)
        or      a
        jr      z,l103c                 ; (+$0d)
        ld      hl,$f347
        push    hl
        ld      hl,$f343
        push    hl
        call    lbab0
        jr      c,l1051                 ; (+$15)
l103c:  ld      a,(ix-$0b)
        or      a
        jp      z,l0fbd
        ld      hl,$f343
        push    hl
        ld      hl,$f347
        push    hl
        call    lbad9
        jp      nz,l0fbd
l1051:  ld      a,($f351)
        ld      (ix-$0a),a
        ld      a,($f352)
        ld      (ix-$09),a
l105d:  ld      l,(ix-$0a)
        ld      h,(ix-$09)
        ld      a,($f127)
        ld      c,a
        ld      a,(hl)
        cp      c
        jr      z,l107c                 ; (+$11)
        ld      l,(ix-$0a)
        ld      h,(ix-$09)
        inc     hl
        inc     hl
        inc     hl
        ld      (ix-$0a),l
        ld      (ix-$09),h
        jr      l105d                   ; (-$1f)
l107c:  ld      l,(ix-$0a)
        ld      h,(ix-$09)
        inc     hl
        ld      a,(hl)
        inc     hl
        ld      h,(hl)
        ld      l,a
        ld      bc,($f42a)
        add     hl,bc
        ld      ($f359),hl
        jp      l0fbd
        ld      b,(hl)
        ld      b,c
        ld      d,h
        ld      b,c
        ld      c,h
        dec     l
        nop     
        ld      b,c
        ld      d,h
        ld      d,h
        ld      b,l
        ld      c,l
        ld      d,b
        ld      d,h
        ld      b,l
        ld      b,h
        jr      nz,l10f6                ; (+$52)
        ld      b,l
        ld      b,e
        ld      d,l
        ld      d,d
        ld      d,e
        ld      c,c
        ld      c,a
        ld      c,(hl)
        nop     
        ld      d,b
        ld      d,d
        ld      c,a
        ld      b,a
        ld      d,d
        ld      b,c
        ld      c,l
        jr      nz,l1104                ; (+$4e)
        ld      c,a
        ld      d,h
        jr      nz,l1100                ; (+$46)
        ld      c,a
        ld      d,l
        ld      c,(hl)
        ld      b,h
        nop     
        dec     l
        jr      nz,l1110                ; (+$4e)
        ld      c,a
        ld      d,h
        jr      nz,l110c                ; (+$46)
        ld      c,a
        ld      d,l
        ld      c,(hl)
        ld      b,h
        nop     
        ld      b,h
        ld      b,l
        ld      d,b
        ld      d,h
        ld      c,b
        jr      nz,l1117                ; (+$45)
        ld      e,b
        ld      b,e
        ld      b,l
        ld      b,l
        ld      b,h
        ld      b,l
        ld      b,h
        nop     
        rst     $30
        ld      hl,$fff1
        add     hl,sp
        ld      sp,hl
        ld      l,$58
        rst     $08
        ld      l,$37
        rst     $10
        ld      a,$63
        ld      ($f0c7),a
        ld      a,($f140)
        cp      $02
        jr      nz,l111b                ; (+$29)
l10f2:  ld      hl,$f0c5
        push    hl
l10f6:  ld      hl,$0441
        push    hl
        ld      l,$08
        push    hl
        ld      l,$0a
        push    hl
l1100:  ld      hl,$f347
        call    l784c
        ld      (ix-$09),c
        ld      a,(ix-$09)
l110c:  cp      $02
        jr      nz,l1140                ; (+$30)
l1110:  ld      l,$5a
        rst     $08
        ld      l,$5a
        rst     $08
        call    l736f
        jr      l10f2                   ; (-$29)
l111b:  ld      hl,$f347
        push    hl
        ld      hl,$f130
        push    hl
        rst     $18
        pop     af
        ld      hl,$f0c5
        push    hl
        ld      hl,$0441
        push    hl
        ld      l,$00
        push    hl
        ld      l,$0a
        push    hl
        ld      hl,$f347
        call    l784c
        ld      a,c
        or      a
        jr      nz,l114f                ; (+$12)
        jp      lbe72
l1140:  ld      a,(ix-$09)
        or      a
        jr      nz,l1149                ; (+$03)
        jp      lbe72
l1149:  call    l9a22
        jp      l12c0
l114f:  ld      a,($f349)
        ld      (ix-$0b),a
        ld      a,($f34b)
        cp      $0a
        jp      m,l1169
        ld      hl,$10cb
        ld      (ix-$08),l
        ld      (ix-$07),h
        jp      l11d1
l1169:  ld      a,(ix-$0b)
        ld      c,a
        add     a,a
        sbc     a,a
        ld      b,a
        ld      l,c
        ld      h,b
        add     hl,hl
        ld      bc,$f35f
        add     hl,bc
        ld      a,(hl)
        inc     hl
        or      (hl)
        jr      nz,l118a                ; (+$0e)
        ld      a,($f140)
        cp      $01
        jr      nz,l119d                ; (+$1a)
        ld      hl,$10bf
        rst     $28
        jp      l12c0
l118a:  ld      a,($f140)
        cp      $01
        jr      nz,l11a8                ; (+$17)
        ld      hl,$f130
        push    hl
        ld      hl,$f347
        push    hl
        rst     $18
        pop     af
        jr      l11a8                   ; (+$0b)
l119d:  ld      hl,$10ad
        ld      (ix-$08),l
        ld      (ix-$07),h
        jr      l11d1                   ; (+$29)
l11a8:  ld      (ix-$0a),$00
l11ac:  ld      hl,$f34b
        ld      a,(ix-$0a)
        cp      (hl)
        jp      p,l1210
        ld      hl,$f117
        ld      a,(ix-$0a)
        ld      e,a
        add     a,a
        sbc     a,a
        ld      d,a
        add     hl,de
        ld      a,(hl)
        cp      (ix-$0b)
        jp      nz,l1286
        ld      hl,$1099
        ld      (ix-$08),l
        ld      (ix-$07),h
l11d1:  ld      a,$01
        ld      ($f140),a
        ld      l,$58
        rst     $08
        ld      hl,$1092
        rst     $28
        ld      l,(ix-$08)
        ld      h,(ix-$07)
        rst     $28
        ld      a,($f34b)
        ld      l,a
        ld      a,($f34b)
        add     a,$01
        ld      ($f34b),a
        ld      a,l
        ld      c,a
        add     a,a
        sbc     a,a
        ld      b,a
        ld      l,c
        ld      h,b
        ld      bc,$f117
        add     hl,bc
        ld      a,(ix-$0b)
        ld      (hl),a
        call    la86f
        ld      a,($f126)
        ld      ($e969),a
        ld      a,$45
        ld      ($f126),a
        jp      lbe72
l1210:  ld      hl,$f117
        ld      a,($f34b)
        ld      e,a
        add     a,a
        sbc     a,a
        ld      d,a
        add     hl,de
        ld      a,(ix-$0b)
        ld      ($f429),a
        ld      (hl),a
        ld      a,($f429)
        ld      c,a
        add     a,a
        sbc     a,a
        ld      b,a
        ld      l,c
        ld      h,b
        add     hl,hl
        ld      bc,$f35f
        add     hl,bc
        ld      a,(hl)
        inc     hl
        ld      h,(hl)
        ld      l,a
        ld      ($f42a),hl
        ld      a,($f140)
        cp      $03
        jp      nz,l128c
        ld      hl,($f42a)
        ld      a,(hl)
        cp      $53
        jp      nz,l12c3
        ld      hl,$f160
        ld      (ix-$0e),l
        ld      (ix-$0d),h
        ld      a,($f34b)
        ld      c,a
        add     a,a
        sbc     a,a
        ld      b,a
        push    bc
        ld      hl,l0020
        push    hl
        call    lba2d
        pop     hl
        ld      bc,$f181
        add     hl,bc
        push    hl
        ld      l,(ix-$0e)
        ld      h,(ix-$0d)
        ld      bc,$001f
        add     hl,bc
        push    hl
        ld      l,(ix-$0e)
        ld      h,(ix-$0d)
        call    l9ad7
        ld      hl,l0020
        push    hl
        ld      hl,$f160
        call    lb8c3
        jr      l12c3                   ; (+$3d)
l1286:  inc     (ix-$0a)
        jp      l11ac
l128c:  ld      a,$03
        ld      ($f140),a
        ld      l,$01
        call    lb11f
        ld      hl,$0003
        sub     a
        ld      ($f116),a
        ld      ($f0bf),hl
        ld      a,$10
        ld      ($f0b7),a
l12a5:  ld      a,($f34b)
        add     a,$01
        ld      ($f34b),a
        ld      hl,($f42a)
        call    l9b21
        ld      l,c
        ld      h,b
        inc     hl
        ld      ($f351),hl
        ld      hl,($f42a)
        inc     hl
        ld      ($f359),hl
l12c0:  jp      lbe72
l12c3:  ld      a,($f34b)
        ld      c,a
        add     a,a
        sbc     a,a
        ld      b,a
        ld      l,c
        ld      h,b
        add     hl,hl
        ld      bc,$f141
        add     hl,bc
        ld      a,($f359)
        ld      (hl),a
        ld      a,($f35a)
        inc     hl
        ld      (hl),a
        jr      l12a5                   ; (-$37)
        jr      nc,l130f                ; (+$31)
        ld      ($3433),a
        dec     (hl)
        ld      (hl),$37
        jr      c,l131f                 ; (+$39)
        ld      b,c
        ld      b,d
        ld      b,e
        ld      b,h
        ld      b,l
        ld      b,(hl)
        daa     
        ld      hl,($2325)
        ld      e,h
        ld      ($2f24),hl
        nop     
        nop     
        nop     
        nop     
        nop     
        nop     
        jr      nz,l1343                ; (+$47)
        ld      c,b
        ld      c,h
        ld      c,l
        ld      d,c
        ld      d,d
        ld      d,(hl)
        dec     sp
        inc     l
        ld      d,a
        ld      b,b
        ld      c,c
        ld      d,h
        ld      d,l
        ld      c,(hl)
        ld      c,a
        ld      d,b
        ld      e,b
        dec     a
        ld      e,c
l130f:  inc     a
        ld      e,d
        ld      a,$2d
        ld      c,d
        dec     hl
        ccf     
        nop     
        nop     
        nop     
        ld      l,$53
        ld      c,e
        ld      b,$24
        ld      b,b
l131f:  dec     h
        cpl     
        ld      e,h
        ccf     
        adc     a,h
        dec     d
        ld      l,e
        ld      d,$c1
        dec     d
        pop     bc
        dec     d
        adc     a,a
        dec     d
        dec     a
        dec     d
        dec     a
        dec     d
        ex      af,af'
        inc     hl
        inc     h
        ld      b,b
        dec     h
        cpl     
        ld      e,h
        ccf     
        dec     hl
        inc     bc
        rla     
        sbc     a,$16
        sbc     a,h
        inc     d
        sbc     a,h
        inc     d
        sbc     a,h
l1343:  inc     d
        sbc     a,h
        inc     d
        sbc     a,h
        inc     d
        sbc     a,h
        inc     d
        add     a,l
        inc     d
l134c:  rst     $30
        ld      hl,$ffee
        add     hl,sp
        ld      sp,hl
        ld      a,($f140)
        cp      $02
        jr      nz,l138e                ; (+$35)
        ld      l,$58
        rst     $08
        ld      a,($f127)
        ld      l,a
        rst     $10
        ld      l,$5b
        rst     $08
        ld      (ix-$0b),$00
l1368:  ld      l,$17
        call    l7395
        ld      a,($f127)
        cp      $1c
        jr      z,l1379                 ; (+$05)
        ld      bc,$0001
        jr      l137c                   ; (+$03)
l1379:  ld      bc,l0000
l137c:  ld      a,c
        or      b
        jr      z,l13c4                 ; (+$44)
        ld      a,($f127)
        cp      $1d
        jp      nz,l13d0
        call    lb8e6
        jp      lbe72
l138e:  ld      a,$01
        ld      ($f140),a
        ld      (ix-$08),$01
        ld      a,($f127)
        cp      $3f
        jr      nz,l13a2                ; (+$04)
        ld      c,$01
        jr      l13a4                   ; (+$02)
l13a2:  ld      c,$00
l13a4:  ld      (ix-$07),c
        ld      a,(ix-$07)
        or      a
        jp      nz,l142b
        ld      l,$71
        rst     $08
        ld      hl,($f359)
        ld      a,(hl)
        cp      $ab
        jp      nz,l1428
        ld      hl,($f359)
        inc     hl
        ld      ($f359),hl
        jp      l142b
l13c4:  ld      l,$5c
        rst     $08
        ld      l,$74
        rst     $10
        call    l9a22
        jp      l1722
l13d0:  ld      a,($f127)
        cp      $1a
        jr      nz,l13e3                ; (+$0c)
        ld      a,(ix-$0b)
        or      a
        jr      nz,l13f1                ; (+$14)
        call    l736f
        jp      l1368
l13e3:  ld      a,(ix-$0b)
        cp      $1b
        jp      m,l13fa
        call    l736f
        jp      l1368
l13f1:  ld      l,$5a
        rst     $08
        dec     (ix-$0b)
        jp      l1368
l13fa:  ld      hl,$12dc
        ld      a,($f127)
        ld      e,a
        sub     a
        ld      d,a
        add     hl,de
        ld      a,(hl)
        ld      (ix-$0a),a
        ld      a,(ix-$0a)
        or      a
        jr      nz,l1414                ; (+$06)
        call    l736f
        jp      l1368
l1414:  ld      a,(ix-$0a)
        ld      c,a
        add     a,a
        sbc     a,a
        ld      b,a
        ld      l,c
        ld      h,b
        ld      a,l
        or      $80
        ld      l,a
        rst     $10
        inc     (ix-$0b)
        jp      l1368
l1428:  ld      l,$58
        rst     $08
l142b:  ld      a,$03
        ld      ($f140),a
        ld      l,$17
        call    l7395
        ld      a,$01
        ld      ($f140),a
        ld      a,($f127)
        cp      $74
        jr      z,l1446                 ; (+$05)
        ld      bc,$0001
        jr      l1449                   ; (+$03)
l1446:  ld      bc,l0000
l1449:  ld      a,c
        or      b
        jr      z,l145e                 ; (+$11)
        sub     a
        ld      ($f0b9),a
        ld      a,($f127)
        cp      $45
        jr      nz,l1472                ; (+$1a)
        call    lb8e6
        jp      lbe72
l145e:  ld      a,(ix-$07)
        or      a
        jp      z,l171a
        ld      a,(ix-$08)
        or      a
        jp      z,l171d
        call    la5e1
        jp      l171d
l1472:  ld      a,($f127)
        and     $7f
        ld      l,a
        ld      (ix-$0a),l
        ld      l,(ix-$0a)
        ld      c,l
        ld      hl,$1331
        jp      lb8ed
        ld      a,(ix-$07)
        or      a
        jr      z,l1493                 ; (+$08)
        ld      l,$07
        call    la661
        jp      l142b
l1493:  call    l736f
        jp      l142b
        jp      l142b
        ld      a,(ix-$0a)
        ld      (ix-$12),a
        ld      hl,($f359)
        push    hl
        inc     hl
        ld      ($f359),hl
        pop     hl
        ld      a,(hl)
        ld      ($f127),a
        and     $7f
        ld      l,a
        ld      (ix-$0a),l
        ld      a,(ix-$0a)
        cp      (ix-$12)
        jr      nz,l14cc                ; (+$0f)
        ld      a,(ix-$07)
        or      a
        jr      z,l14ee                 ; (+$2b)
        ld      l,(ix-$12)
        call    la661
        jp      l142b
l14cc:  ld      a,(ix-$0a)
        cp      $30
        jp      m,l14fd
        ld      a,$46
        cp      (ix-$0a)
        jp      m,l14fd
        ld      a,$39
        cp      (ix-$0a)
        jp      p,l150f
        ld      a,(ix-$0a)
        cp      $41
        jp      p,l150f
        jr      l14fd                   ; (+$0f)
l14ee:  ld      c,(ix-$12)
        sub     a
        ld      b,a
        ld      l,c
        ld      h,b
        ld      a,l
        or      $80
        ld      l,a
        rst     $10
        jp      l142b
l14fd:  call    lb8e6
        ld      a,(ix-$07)
        or      a
        jr      z,l152e                 ; (+$28)
        ld      l,(ix-$12)
        call    la661
        jp      l142b
l150f:  ld      a,$39
        cp      (ix-$0a)
        jp      m,l151b
        ld      c,$30
        jr      l151d                   ; (+$02)
l151b:  ld      c,$37
l151d:  ld      a,(ix-$0a)
        sub     c
        ld      (ix-$0a),a
        ld      l,(ix-$12)
        ld      c,l
        ld      hl,$131c
        jp      lb8ed
l152e:  ld      c,(ix-$12)
        sub     a
        ld      b,a
        ld      l,c
        ld      h,b
        ld      a,l
        or      $80
        ld      l,a
        rst     $10
        jp      l142b
        ld      a,(ix-$12)
        cp      $24
        jr      nz,l154a                ; (+$06)
        ld      (ix-$09),$10
        jr      l154e                   ; (+$04)
l154a:  ld      (ix-$09),$0a
l154e:  ld      a,(ix-$07)
        or      a
        jr      z,l1570                 ; (+$1c)
        ld      l,$01
        push    hl
        ld      l,(ix-$09)
        push    hl
        ld      a,(ix-$0a)
        ld      c,a
        add     a,a
        sbc     a,a
        ld      b,a
        ld      l,c
        ld      h,b
        add     hl,hl
        add     hl,hl
        ld      bc,$f160
        add     hl,bc
        call    laa31
        jp      l142b
l1570:  ld      l,$01
        push    hl
        ld      l,(ix-$09)
        push    hl
        ld      a,(ix-$0a)
        ld      c,a
        add     a,a
        sbc     a,a
        ld      b,a
        ld      l,c
        ld      h,b
        add     hl,hl
        add     hl,hl
        ld      bc,$f160
        add     hl,bc
        call    l7fc5
        jp      l142b
        jp      l142b
        ld      a,(ix-$07)
        or      a
        jr      z,l15ab                 ; (+$16)
        ld      a,(ix-$0a)
        ld      c,a
        add     a,a
        sbc     a,a
        ld      b,a
        ld      l,c
        ld      h,b
        add     hl,hl
        add     hl,hl
        ld      bc,$f162
        add     hl,bc
        ld      l,(hl)
        call    la661
        jp      l142b
l15ab:  ld      a,($f0b7)
        cp      (ix-$0a)
        jr      nz,l15b7                ; (+$04)
        ld      c,$10
        jr      l15ba                   ; (+$03)
l15b7:  ld      c,(ix-$0a)
l15ba:  ld      a,c
        ld      ($f0b7),a
        jp      l142b
        ld      a,(ix-$07)
        or      a
        jr      z,l1607                 ; (+$40)
        ld      a,(ix-$0a)
        ld      c,a
        add     a,a
        sbc     a,a
        ld      b,a
        ld      l,c
        ld      h,b
        add     hl,hl
        add     hl,hl
        ld      bc,$f160
        add     hl,bc
        push    hl
        ld      hl,$0441
        push    hl
        rst     $18
        pop     af
        ld      a,(ix-$12)
        cp      $2f
        jp      nz,l164b
        ld      a,$03
        ld      ($f140),a
        ld      a,(ix-$0a)
        ld      c,a
        add     a,a
        sbc     a,a
        ld      b,a
        ld      l,c
        ld      h,b
        add     hl,hl
        add     hl,hl
        ld      bc,$f162
        add     hl,bc
        push    hl
        call    la690
        pop     hl
        ld      (hl),c
        ld      a,$01
        ld      ($f140),a
        jp      l142b
l1607:  ld      l,$72
        rst     $08
        ld      a,($f134)
        ld      (ix-$0d),a
        ld      l,$04
        call    lb11f
        ld      l,$08
        call    lb136
        ld      a,(ix-$12)
        cp      $2f
        jr      nz,l1625                ; (+$04)
        ld      c,$10
        jr      l1627                   ; (+$02)
l1625:  ld      c,$0a
l1627:  push    bc
        ld      a,(ix-$0a)
        ld      c,a
        add     a,a
        sbc     a,a
        ld      b,a
        ld      l,c
        ld      h,b
        add     hl,hl
        add     hl,hl
        ld      bc,$f160
        add     hl,bc
        call    la4e5
        ld      l,$04
        call    lb136
        ld      l,(ix-$0d)
        call    lb11f
        ld      l,$71
        rst     $08
        jp      l142b
l164b:  ld      a,(ix-$0a)
        ld      c,a
        add     a,a
        sbc     a,a
        ld      b,a
        ld      l,c
        ld      h,b
        add     hl,hl
        add     hl,hl
        ld      bc,$f162
        add     hl,bc
        push    hl
        ld      l,$e2
        call    lba5c
        ld      a,c
        and     $1f
        ld      c,a
        pop     hl
        sub     a
        ld      b,a
        ld      (hl),c
        jp      l142b
        ld      a,(ix-$07)
        or      a
        jr      z,l1679                 ; (+$08)
        ld      l,$3f
        call    la661
        jp      l142b
l1679:  ld      hl,$00bf
        rst     $10
        ld      l,$72
        rst     $08
        ld      a,($f134)
        ld      (ix-$0d),a
        ld      l,$04
        call    lb11f
        ld      l,$08
        call    lb136
        ld      hl,$0085
        call    l7395
        ld      a,c
        or      a
        jr      nz,l16ca                ; (+$30)
        ld      a,(ix-$0a)
        ld      c,a
        add     a,a
        sbc     a,a
        ld      b,a
        ld      l,c
        ld      h,b
        add     hl,hl
        add     hl,hl
        ld      bc,$f160
        add     hl,bc
        push    hl
        ld      a,($f127)
        cp      $1c
        jr      nz,l16b5                ; (+$04)
        ld      c,$01
        jr      l16b7                   ; (+$02)
l16b5:  ld      c,$00
l16b7:  pop     hl
        ld      a,c
        inc     hl
        inc     hl
        ld      (hl),a
        add     a,a
        sbc     a,a
        inc     hl
        ld      (hl),a
        dec     hl
        dec     hl
        ld      (hl),a
        dec     hl
        ld      (hl),a
        ld      l,$5a
        rst     $08
        jr      l16cd                   ; (+$03)
l16ca:  call    lb8e6
l16cd:  ld      l,$04
        call    lb136
        ld      l,(ix-$0d)
        call    lb11f
        ld      l,$71
        rst     $08
        jp      l142b
        ld      a,(ix-$07)
        or      a
        jr      z,l16f3                 ; (+$0f)
        ld      hl,($f359)
        ld      a,(hl)
        cp      $74
        jr      nz,l16fb                ; (+$0f)
        ld      (ix-$08),$00
        jp      l142b
l16f3:  ld      a,($f127)
        ld      l,a
        rst     $10
        jp      l142b
l16fb:  ld      l,$2b
        call    la661
        jp      l142b
        ld      a,(ix-$07)
        or      a
        jr      z,l1712                 ; (+$09)
        ld      l,(ix-$0a)
        call    la661
        jp      l142b
l1712:  ld      a,($f127)
        ld      l,a
        rst     $10
        jp      l142b
l171a:  ld      l,$72
        rst     $08
l171d:  ld      a,$03
        ld      ($f140),a
l1722:  jp      lbe72
        rst     $30
        push    af
        push    af
        push    af
        push    af
        ld      a,($f34b)
        sub     $01
        ld      ($f34b),a
        or      a
        jr      nz,l174b                ; (+$16)
        ld      a,($f116)
        or      a
        jp      z,l1789
        ld      a,$01
        ld      ($f34b),a
        ld      hl,($f42a)
        inc     hl
        ld      ($f359),hl
        jp      l1819
l174b:  ld      hl,($f42a)
        ld      a,(hl)
        cp      $53
        jp      nz,l17d8
        ld      a,($f34b)
        ld      c,a
        add     a,a
        sbc     a,a
        ld      b,a
        push    bc
        ld      hl,l0020
        push    hl
        call    lba2d
        pop     hl
        ld      bc,$f181
        add     hl,bc
        ld      (ix-$08),l
        ld      (ix-$07),h
        ld      hl,$f160
        push    hl
        ld      l,(ix-$08)
        ld      h,(ix-$07)
        ld      bc,$001f
        add     hl,bc
        push    hl
        ld      l,(ix-$08)
        ld      h,(ix-$07)
        call    l9ad7
        jp      l17d8
l1789:  ld      l,$01
        call    lb136
        ld      a,$01
        ld      ($f140),a
        ld      l,$0f
        call    l7395
        ld      a,($f127)
        cp      $27
        jr      nz,l17a9                ; (+$0a)
        ld      a,$01
        ld      ($f116),a
        ld      l,$08
        call    lb11f
l17a9:  ld      a,($f127)
        cp      $26
        jr      z,l17b6                 ; (+$06)
        ld      a,($f116)
        or      a
        jr      z,l17d3                 ; (+$1d)
l17b6:  ld      l,$01
        call    lb11f
        ld      a,$03
        ld      ($f140),a
        ld      a,$01
        ld      ($f34b),a
        ld      hl,($f42a)
        inc     hl
        ld      ($f359),hl
        ld      a,$10
        ld      ($f0b7),a
        jr      l1819                   ; (+$46)
l17d3:  call    lb8e6
        jr      l1819                   ; (+$41)
l17d8:  ld      a,($f34b)
        ld      c,a
        add     a,a
        sbc     a,a
        ld      b,a
        ld      l,c
        ld      h,b
        ld      bc,$f116
        add     hl,bc
        ld      a,(hl)
        ld      ($f429),a
        ld      c,a
        add     a,a
        sbc     a,a
        ld      b,a
        ld      l,c
        ld      h,b
        add     hl,hl
        ld      bc,$f35f
        add     hl,bc
        ld      a,(hl)
        inc     hl
        ld      h,(hl)
        ld      l,a
        ld      ($f42a),hl
        call    l9b21
        ld      l,c
        ld      h,b
        inc     hl
        ld      ($f351),hl
        ld      a,($f34b)
        ld      c,a
        add     a,a
        sbc     a,a
        ld      b,a
        ld      l,c
        ld      h,b
        add     hl,hl
        ld      bc,$f141
        add     hl,bc
        ld      a,(hl)
        inc     hl
        ld      h,(hl)
        ld      l,a
        ld      ($f359),hl
l1819:  jp      lbe72
l181c:  rst     $30
        ld      l,$58
        rst     $08
        ld      a,($f140)
        cp      $02
        jr      nz,l182f                ; (+$08)
        ld      l,$28
        rst     $10
        call    l9a22
        jr      l1867                   ; (+$38)
l182f:  ld      a,($f140)
        cp      $01
        jr      nz,l183b                ; (+$05)
        ld      l,$4c
        rst     $10
        jr      l1867                   ; (+$2c)
l183b:  ld      l,$04
        call    lb11f
l1840:  ld      l,$42
        call    l767c
        ld      a,c
        or      a
        jr      z,l1840                 ; (-$09)
        ld      a,($f126)
        cp      $25
        jr      nz,l1857                ; (+$07)
        ld      a,$7f
        ld      ($f126),a
        jr      l1862                   ; (+$0b)
l1857:  ld      a,($f126)
        ld      ($e969),a
        ld      a,$45
        ld      ($f126),a
l1862:  ld      l,$04
        call    lb136
l1867:  jp      lbe72
        rst     $30
        ld      a,($e969)
        ld      ($f126),a
        sub     a
        ld      ($f34b),a
        ld      ($f116),a
        ld      a,($f140)
        cp      $03
        jr      nz,l1884                ; (+$05)
        ld      a,$01
        ld      ($f140),a
l1884:  ld      l,$09
        call    lb136
        ld      l,$72
        rst     $08
        sub     a
        ld      ($f125),a
        jp      lbe72
        rst     $30
l1894:  ld      hl,($f42a)
        push    hl
        ld      bc,($f0bf)
        add     hl,bc
        ld      c,l
        ld      b,h
        pop     hl
        call    lb91e
        ld      l,c
        ld      h,b
        ld      ($f0bf),hl
        ld      a,h
        or      l
        jr      z,l18c8                 ; (+$1c)
        ld      l,$81
        call    lba5c
        bit     0,c
        jr      z,l1894                 ; (-$21)
        ld      a,($f359)
        sub     $01
        ld      ($f359),a
        ld      a,($f35a)
        sbc     a,$00
        ld      ($f35a),a
        jp      lbe72
l18c8:  ld      hl,$0003
        ld      ($f0bf),hl
        jp      lbe72
        rst     $30
        ld      l,$58
        rst     $08
        ld      l,$14
        rst     $10
        ld      l,$7f
        rst     $10
        ld      hl,l0000
        push    hl
        ld      hl,$18f7
        push    hl
        ld      a,($f140)
        cp      $03
        jr      nz,l18ee                ; (+$04)
        ld      c,$01
        jr      l18f0                   ; (+$02)
l18ee:  ld      c,$00
l18f0:  ld      l,c
        call    l8851
        jp      lbe72
        rst     $20
        push    af
        push    af
        push    af
        push    af
        ld      (ix-$07),$00
        ld      l,$01
        call    l1a86
        ld      (ix-$08),c
        ld      a,(ix-$08)
        cp      $02
        jr      z,l1957                 ; (+$48)
        ld      a,(ix-$07)
        or      (ix-$08)
        ld      (ix-$07),a
        ld      l,$01
        call    l226e
        ld      (ix-$08),c
        ld      a,(ix-$08)
        cp      $02
        jr      z,l1957                 ; (+$30)
        ld      a,(ix-$07)
        or      (ix-$08)
        ld      (ix-$07),a
        ld      l,$01
        call    l1fda
        ld      (ix-$08),c
        ld      a,(ix-$08)
        cp      $02
        jr      z,l1957                 ; (+$18)
        ld      a,(ix-$07)
        or      (ix-$08)
        ld      (ix-$07),a
        ld      l,$01
        call    l1f24
        ld      (ix-$08),c
        ld      a,(ix-$08)
        cp      $02
        jr      nz,l195c                ; (+$05)
l1957:  ld      c,$02
        jp      lbe84
l195c:  ld      a,(ix-$07)
        or      (ix-$08)
        ld      (ix-$07),a
        ld      c,(ix-$07)
        jp      lbe84
        jp      c,l6b1f
        inc     hl
        ld      l,(hl)
l1970:  ld      (l1f24),hl
        add     a,b
        jr      nz,l1970                ; (-$06)
        inc     hl
        ld      (l1fc2),iy
        ld      (bc),a
        ld      d,$19
        ld      e,d
        ld      a,(de)
        dec     sp
        ld      a,(de)
        add     hl,de
        ld      a,(de)
        ld      (bc),a
        nop     
        ld      (bc),a
        rst     $30
        add     hl,de
        or      (hl)
        add     hl,de
        or      c
        add     hl,de
        rst     $30
        ld      hl,$fff5
        add     hl,sp
        ld      sp,hl
        ld      l,$58
        rst     $08
        ld      a,($f127)
        ld      (ix-$0a),a
        ld      l,(ix-$0a)
        rst     $10
        ld      l,$00
        call    la3cd
        ld      (ix-$09),c
        ld      c,(ix-$09)
        ld      hl,$1984
        jp      lb8ed
l19b1:  ld      c,$02
        jp      lbe72
        ld      l,(ix-$0a)
        ld      a,l
        add     a,a
        ld      l,a
        ld      c,a
        add     a,a
        sbc     a,a
        ld      b,a
        ld      l,c
        ld      h,b
        ld      bc,$193f
        add     hl,bc
        ld      a,(hl)
        ld      (ix-$08),a
        inc     hl
        ld      a,(hl)
        ld      (ix-$07),a
l19cf:  ld      l,$7f
        rst     $10
        ld      hl,l0000
        push    hl
        ld      l,(ix-$08)
        ld      h,(ix-$07)
        push    hl
        ld      a,($f140)
        cp      $03
        jr      nz,l19e8                ; (+$04)
        ld      c,$01
        jr      l19ea                   ; (+$02)
l19e8:  ld      c,$00
l19ea:  ld      l,c
        call    l8851
        ld      (ix-$0b),c
        ld      c,(ix-$0b)
        jp      lbe72
        ld      l,(ix-$0a)
        ld      a,l
        add     a,a
        ld      l,a
        ld      c,a
        add     a,a
        sbc     a,a
        ld      b,a
        ld      l,c
        ld      h,b
        ld      bc,$1947
        add     hl,bc
        ld      a,(hl)
        ld      (ix-$08),a
        inc     hl
        ld      a,(hl)
        ld      (ix-$07),a
        ld      c,(ix-$0a)
        ld      hl,$197b
        jp      lb8ed
        ld      l,$54
        rst     $10
        ld      hl,$03f9
        push    hl
        ld      hl,$0441
        push    hl
        ld      l,$00
        push    hl
        ld      l,$10
        push    hl
        ld      hl,$f18c
        call    l784c
        ld      a,c
        or      a
        jp      nz,l19cf
        jp      l19b1
        jp      l19cf
        ld      l,$55
        rst     $10
        ld      hl,$f0d4
        push    hl
        ld      hl,$03bd
        push    hl
        ld      l,$00
        push    hl
        ld      l,$10
        push    hl
        ld      hl,$f188
        call    l784c
        ld      a,c
        or      a
        jp      nz,l19cf
        jp      l19b1
        ld      l,$63
        rst     $10
        jp      l19cf
        rst     $30
        ld      l,$58
        rst     $08
        ld      l,$15
        rst     $10
        ld      l,$7f
        rst     $10
        ld      hl,l0000
        push    hl
        ld      hl,l1a86
        push    hl
        ld      a,($f140)
        cp      $03
        jr      nz,l1a7d                ; (+$04)
        ld      c,$01
        jr      l1a7f                   ; (+$02)
l1a7d:  ld      c,$00
l1a7f:  ld      l,c
        call    l8851
        jp      lbe72
l1a86:  rst     $20
        ld      hl,$fff7
        add     hl,sp
        ld      sp,hl
        ld      a,($f114)
        ld      (ix-$09),a
        ld      a,($f114)
        and     $f8
        ld      ($f114),a
        ld      l,$00
        call    l947f
        ld      (ix-$07),c
        ld      a,(ix-$07)
        cp      $02
        jp      z,l1b52
        ld      l,$04
        call    l8b1d
        ld      (ix-$08),c
        ld      a,(ix-$08)
        cp      $02
        jp      z,l1b52
        ld      a,(ix-$07)
        or      (ix-$08)
        ld      (ix-$07),a
        ld      hl,$f347
        ld      a,(hl)
        inc     hl
        or      (hl)
        inc     hl
        or      (hl)
        inc     hl
        or      (hl)
        jr      z,l1ae6                 ; (+$17)
        ld      hl,$1e02
        push    hl
        ld      hl,$1e5e
        call    lb184
        ld      (ix-$08),c
        ld      a,(ix-$08)
        cp      $02
        jr      nz,l1b01                ; (+$1e)
        jp      l1b52
l1ae6:  ld      a,$6c
        ld      ($f44d),a
        ld      a,(ix-$07)
        or      a
        jr      nz,l1b0c                ; (+$1b)
        ld      l,(ix-$09)
        ld      a,l
        and     $04
        ld      l,a
        ld      a,($f114)
        or      l
        ld      ($f114),a
        jr      l1b0c                   ; (+$0b)
l1b01:  ld      a,(ix-$07)
        or      (ix-$08)
        ld      (ix-$07),a
        jr      l1ae6                   ; (-$26)
l1b0c:  call    l1b72
        ld      (ix-$08),c
        ld      a,(ix-$08)
        cp      $02
        jr      z,l1b52                 ; (+$39)
        ld      a,(ix-$07)
        or      (ix-$08)
        ld      (ix-$07),a
        ld      hl,$f19c
        push    hl
        ld      hl,$f0c1
        push    hl
        rst     $18
        pop     af
        ld      a,$6d
        ld      ($f44d),a
        ld      a,(ix-$07)
        or      a
        jr      nz,l1b45                ; (+$0e)
        ld      l,(ix-$09)
        ld      a,l
        and     $02
        ld      l,a
        ld      a,($f114)
        or      l
        ld      ($f114),a
l1b45:  call    l1b72
        ld      (ix-$08),c
        ld      a,(ix-$08)
        cp      $02
        jr      nz,l1b5d                ; (+$0b)
l1b52:  ld      a,(ix-$09)
        ld      ($f114),a
        ld      c,$02
        jp      lbe84
l1b5d:  ld      a,(ix-$07)
        or      (ix-$08)
        ld      (ix-$07),a
        ld      a,(ix-$09)
        ld      ($f114),a
        ld      c,(ix-$07)
        jp      lbe84
l1b72:  rst     $30
        push    af
        push    af
        push    af
        push    af
        ld      (ix-$07),$00
        sub     a
        ld      ($f448),a
        ld      ($f449),a
        ld      ($f44a),a
        ld      ($f44b),a
        call    l1bfa
        ld      (ix-$08),c
        ld      a,(ix-$08)
        cp      $02
        jr      z,l1be6                 ; (+$51)
        ld      a,(ix-$07)
        or      (ix-$08)
        ld      (ix-$07),a
        ld      hl,$f448
        push    hl
        ld      a,($f44d)
        cp      $6c
        jr      nz,l1bb2                ; (+$09)
        ld      hl,$043d
        ld      de,$f935
        rst     $38
        jr      l1bb9                   ; (+$07)
l1bb2:  ld      hl,$f0d4
        ld      de,$f935
        rst     $38
l1bb9:  ld      hl,$f935
        push    hl
        rst     $18
        pop     af
        call    l1bfa
        ld      (ix-$08),c
        ld      a,(ix-$08)
        cp      $02
        jr      z,l1be6                 ; (+$1a)
        ld      a,(ix-$07)
        or      (ix-$08)
        ld      (ix-$07),a
        ld      a,($f44d)
        ld      l,a
        call    l26b0
        ld      (ix-$08),c
        ld      a,(ix-$08)
        cp      $02
        jr      nz,l1beb                ; (+$05)
l1be6:  ld      c,$02
        jp      lbe72
l1beb:  ld      a,(ix-$07)
        or      (ix-$08)
        ld      (ix-$07),a
        ld      c,(ix-$07)
        jp      lbe72
l1bfa:  rst     $30
        ld      hl,$fff6
        add     hl,sp
        ld      sp,hl
        ld      (ix-$09),$00
        ld      a,($f44d)
        cp      $6c
        jr      nz,l1c27                ; (+$1c)
        ld      hl,$f19c
        push    hl
        ld      hl,$f448
        push    hl
        rst     $18
        pop     af
        ld      l,$09
        call    l8b1d
        ld      (ix-$0a),c
        ld      a,(ix-$0a)
        cp      $02
        jr      nz,l1c43                ; (+$1f)
        jp      l1cca
l1c27:  ld      hl,$f198
        push    hl
        ld      hl,$f448
        push    hl
        rst     $18
        pop     af
        ld      l,$07
        call    l8b1d
        ld      (ix-$0a),c
        ld      a,(ix-$0a)
        cp      $02
        jr      nz,l1c56                ; (+$16)
        jp      l1cca
l1c43:  ld      a,(ix-$09)
        or      (ix-$0a)
        ld      (ix-$09),a
        ld      (ix-$08),$20
        ld      (ix-$07),$00
        jr      l1c6a                   ; (+$14)
l1c56:  ld      a,(ix-$09)
        or      (ix-$0a)
        ld      (ix-$09),a
        ld      a,($f0d9)
        ld      (ix-$08),a
        add     a,a
        sbc     a,a
        ld      (ix-$07),a
l1c6a:  ld      hl,$f442
        push    hl
        ld      hl,$f347
        push    hl
        rst     $18
        pop     hl
        ld      a,(hl)
        inc     hl
        or      (hl)
        inc     hl
        or      (hl)
        inc     hl
        or      (hl)
        jp      z,l1ccf
        sub     a
        ld      ($f446),a
        ld      ($f447),a
l1c85:  ld      a,($f446)
        sub     (ix-$08)
        ld      a,($f447)
        sbc     a,(ix-$07)
        jp      p,l1ccf
        ld      hl,($f446)
        add     hl,hl
        add     hl,hl
        ld      bc,$033d
        add     hl,bc
        ld      de,$f935
        rst     $38
        ld      hl,$f935
        push    hl
        ld      hl,$f442
        push    hl
        call    lba8d
        pop     hl
        ld      a,(hl)
        inc     hl
        or      (hl)
        inc     hl
        or      (hl)
        inc     hl
        or      (hl)
        jr      z,l1cd5                 ; (+$1f)
        ld      hl,$1cea
        push    hl
        ld      hl,$1d58
        call    lb184
        ld      (ix-$0a),c
        ld      a,(ix-$0a)
        cp      $02
        jr      nz,l1cdf                ; (+$15)
l1cca:  ld      c,$02
        jp      lbe72
l1ccf:  ld      c,(ix-$09)
        jp      lbe72
l1cd5:  ld      hl,($f446)
        inc     hl
        ld      ($f446),hl
        jp      l1c85
l1cdf:  ld      a,(ix-$09)
        or      (ix-$0a)
        ld      (ix-$09),a
        jr      l1cd5                   ; (-$15)
        rst     $20
        ld      a,(ix+$04)
        or      a
        jp      z,l1d39
        ld      l,$71
        rst     $08
        ld      l,$58
        rst     $08
        ld      a,($f44d)
        ld      l,a
        rst     $10
        ld      l,$6a
        rst     $10
        ld      l,$60
        rst     $10
        ld      a,($f446)
        ld      ($f0c7),a
        ld      l,$01
        push    hl
        ld      l,$0a
        push    hl
        ld      hl,$f0c5
        call    l7fc5
        ld      l,$63
        rst     $10
        ld      hl,$f448
        ld      a,(hl)
        inc     hl
        or      (hl)
        inc     hl
        or      (hl)
        inc     hl
        or      (hl)
        jr      z,l1d28                 ; (+$04)
        ld      c,$6f
        jr      l1d2a                   ; (+$02)
l1d28:  ld      c,$6e
l1d2a:  ld      a,c
        ld      ($f44c),a
        ld      l,a
        rst     $10
        ld      l,$7d
        rst     $10
        ld      l,$72
        rst     $08
        call    lb8d0
l1d39:  ld      a,(ix+$04)
        or      a
        jr      z,l1d43                 ; (+$04)
        ld      c,$0a
        jr      l1d45                   ; (+$02)
l1d43:  ld      c,$10
l1d45:  ld      l,c
        call    l767c
        ld      a,c
        or      a
        jr      z,l1d39                 ; (-$14)
        ld      l,$7f
        push    hl
        ld      l,$ff
        call    l7f65
        jp      lbe84
        rst     $30
        ld      hl,$fff7
        add     hl,sp
        ld      sp,hl
        ld      (ix-$07),$00
        ld      a,($f44d)
        cp      $6c
        jr      nz,l1d6d                ; (+$04)
        ld      c,$09
        jr      l1d6f                   ; (+$02)
l1d6d:  ld      c,$07
l1d6f:  ld      l,c
        call    l8b1d
        ld      (ix-$08),c
        ld      a,(ix-$08)
        cp      $02
        jr      nz,l1d82                ; (+$05)
        ld      c,$02
        jp      lbe72
l1d82:  ld      a,(ix-$07)
        or      (ix-$08)
        ld      (ix-$07),a
        ld      hl,($f446)
        add     hl,hl
        add     hl,hl
        ld      bc,$033d
        add     hl,bc
        ld      de,$f935
        rst     $38
        ld      hl,$f935
        push    hl
        ld      hl,$f442
        push    hl
        ld      hl,$f347
        push    hl
        rst     $18
        call    lba8d
        pop     hl
        ld      a,(hl)
        inc     hl
        or      (hl)
        inc     hl
        or      (hl)
        inc     hl
        or      (hl)
        jr      z,l1de6                 ; (+$34)
        ld      (ix-$07),$01
        ld      hl,$f448
        ld      a,(hl)
        inc     hl
        or      (hl)
        inc     hl
        or      (hl)
        inc     hl
        or      (hl)
        jr      z,l1dc6                 ; (+$04)
        ld      c,$6f
        jr      l1dc8                   ; (+$02)
l1dc6:  ld      c,$6e
l1dc8:  ld      (ix-$09),c
        ld      hl,$f44c
        ld      a,(ix-$09)
        cp      (hl)
        jr      z,l1dfc                 ; (+$28)
        ld      a,(ix-$09)
        ld      ($f44c),a
        ld      l,a
        push    hl
        ld      l,$fe
        call    l7f65
        call    lb8d0
        jr      l1dfc                   ; (+$16)
l1de6:  ld      a,($f44c)
        cp      $6b
        jr      z,l1dfc                 ; (+$0f)
        ld      a,$6b
        ld      ($f44c),a
        ld      l,a
        push    hl
        ld      l,$fe
        call    l7f65
        call    lb8d0
l1dfc:  ld      c,(ix-$07)
        jp      lbe72
        rst     $20
        ld      a,(ix+$04)
        or      a
        jp      z,l1e3f
        ld      l,$71
        rst     $08
        ld      l,$58
        rst     $08
        ld      l,$65
        rst     $10
        ld      a,$67
        ld      ($f44c),a
        ld      l,a
        rst     $10
        ld      l,$63
        rst     $10
        ld      l,$60
        rst     $10
        ld      hl,$f442
        push    hl
        ld      hl,$f347
        push    hl
        rst     $18
        pop     af
        ld      l,$22
        push    hl
        ld      l,$02
        push    hl
        ld      hl,$f442
        call    l7fc5
        ld      l,$7d
        rst     $10
        ld      l,$72
        rst     $08
        call    lb8d0
l1e3f:  ld      a,(ix+$04)
        or      a
        jr      z,l1e49                 ; (+$04)
        ld      c,$0a
        jr      l1e4b                   ; (+$02)
l1e49:  ld      c,$10
l1e4b:  ld      l,c
        call    l767c
        ld      a,c
        or      a
        jr      z,l1e3f                 ; (-$14)
        ld      l,$7f
        push    hl
        ld      l,$ff
        call    l7f65
        jp      lbe84
        rst     $30
        push    af
        push    af
        push    af
        push    af
        ld      (ix-$07),$00
        ld      l,$04
        call    l8b1d
        ld      (ix-$08),c
        ld      a,(ix-$08)
        cp      $02
        jr      nz,l1e7b                ; (+$05)
        ld      c,$02
        jp      lbe72
l1e7b:  ld      a,(ix-$07)
        or      (ix-$08)
        ld      (ix-$07),a
        ld      hl,$f347
        ld      a,(hl)
        inc     hl
        or      (hl)
        inc     hl
        or      (hl)
        inc     hl
        or      (hl)
        jr      z,l1eb1                 ; (+$21)
        ld      a,(ix-$07)
        or      $01
        ld      (ix-$07),a
        ld      a,($f44c)
        cp      $67
        jp      z,l1eef
        ld      a,$67
        ld      ($f44c),a
        ld      l,a
        push    hl
        ld      l,$01
        call    l7f65
        call    lb8d0
        jr      l1eef                   ; (+$3e)
l1eb1:  ld      a,($f44c)
        cp      $6b
        jp      z,l1f1e
        ld      l,$71
        rst     $08
        ld      a,$6b
        ld      ($f44c),a
        ld      l,a
        push    hl
        ld      l,$01
        call    l7f65
        ld      l,$59
        rst     $08
        sub     a
        ld      ($f442),a
        ld      ($f443),a
        ld      ($f444),a
        ld      ($f445),a
        ld      l,$22
        push    hl
        ld      l,$02
        push    hl
        ld      hl,$f442
        call    l7fc5
        ld      l,$7f
        rst     $10
        ld      l,$72
        rst     $08
        call    lb8d0
        jr      l1f1e                   ; (+$2f)
l1eef:  ld      hl,$f442
        push    hl
        ld      hl,$f347
        push    hl
        call    lbad9
        jr      z,l1f1e                 ; (+$22)
        ld      l,$71
        rst     $08
        ld      l,$59
        rst     $08
        ld      hl,$f442
        push    hl
        ld      hl,$f347
        push    hl
        rst     $18
        pop     af
        ld      l,$22
        push    hl
        ld      l,$02
        push    hl
        ld      hl,$f442
        call    l7fc5
        ld      l,$7f
        rst     $10
        ld      l,$72
        rst     $08
l1f1e:  ld      c,(ix-$07)
        jp      lbe72
l1f24:  rst     $20
        push    af
        push    af
        push    af
        push    af
        ld      (ix-$07),$00
        sub     a
        ld      ($f44e),a
        ld      ($f44f),a
l1f34:  ld      a,($f13e)
        ld      e,a
        add     a,a
        sbc     a,a
        ld      d,a
        ld      a,($f44e)
        sub     e
        ld      a,($f44f)
        sbc     a,d
        jp      p,l1f9a
        ld      hl,($f44e)
        push    hl
        ld      hl,$0012
        push    hl
        call    lba2d
        pop     hl
        ld      bc,$e9ae
        add     hl,bc
        ld      ($f450),hl
        ld      bc,l0008
        add     hl,bc
        ld      a,(hl)
        cp      $01
        jp      nz,l1fa0
        ld      hl,$f139
        push    hl
        ld      hl,($f450)
        push    hl
        rst     $18
        pop     af
        ld      hl,$f121
        push    hl
        ld      hl,($f450)
        inc     hl
        inc     hl
        inc     hl
        inc     hl
        push    hl
        rst     $18
        pop     af
        ld      hl,$f188
        push    hl
        ld      hl,($f450)
        ld      bc,$000e
        add     hl,bc
        push    hl
        rst     $18
        pop     af
        ld      l,$01
        call    l1fc2
        ld      (ix-$08),c
        ld      a,(ix-$08)
        cp      $02
        jr      nz,l1faa                ; (+$12)
        jr      l1fbd                   ; (+$23)
l1f9a:  ld      c,(ix-$07)
        jp      lbe84
l1fa0:  ld      hl,($f44e)
        inc     hl
        ld      ($f44e),hl
        jp      l1f34
l1faa:  ld      a,(ix-$07)
        or      (ix-$08)
        ld      (ix-$07),a
        ld      l,$01
        call    lb2ce
        ld      a,c
        cp      $02
        jr      nz,l1fa0                ; (-$1d)
l1fbd:  ld      c,$02
        jp      lbe84
l1fc2:  rst     $20
        ld      hl,$fff9
        add     hl,sp
        ld      sp,hl
        call    la466
        ld      hl,$f188
        call    l24a5
        ld      (ix-$07),c
        ld      c,(ix-$07)
        jp      lbe84
l1fda:  rst     $20
        push    af
        push    af
        push    af
        push    af
        ld      (ix-$07),$00
        sub     a
        ld      ($f453),a
        ld      ($f454),a
l1fea:  ld      a,($f13e)
        ld      e,a
        add     a,a
        sbc     a,a
        ld      d,a
        ld      a,($f453)
        sub     e
        ld      a,($f454)
        sbc     a,d
        jp      p,l2058
        ld      hl,($f453)
        push    hl
        ld      hl,$0012
        push    hl
        call    lba2d
        pop     hl
        ld      bc,$e9ae
        add     hl,bc
        ld      (lf455),hl
        ld      bc,l0008
        add     hl,bc
        ld      a,(hl)
        cp      $03
        jr      nz,l205e                ; (+$46)
        ld      hl,$f139
        push    hl
        ld      hl,(lf455)
        push    hl
        rst     $18
        pop     af
        ld      hl,$f121
        push    hl
        ld      hl,(lf455)
        inc     hl
        inc     hl
        inc     hl
        inc     hl
        push    hl
        rst     $18
        pop     af
        ld      hl,(lf455)
        ld      bc,$000e
        add     hl,bc
        sub     a
        ld      ($f18c),a
        ld      ($f18d),a
        ld      a,(hl)
        ld      ($f18e),a
        inc     hl
        ld      a,(hl)
        ld      ($f18f),a
        ld      l,$01
        call    l2080
        ld      (ix-$08),c
        ld      a,(ix-$08)
        cp      $02
        jr      nz,l2068                ; (+$12)
        jr      l207b                   ; (+$23)
l2058:  ld      c,(ix-$07)
        jp      lbe84
l205e:  ld      hl,($f453)
        inc     hl
        ld      ($f453),hl
        jp      l1fea
l2068:  ld      a,(ix-$07)
        or      (ix-$08)
        ld      (ix-$07),a
        ld      l,$01
        call    lb2ce
        ld      a,c
        cp      $02
        jr      nz,l205e                ; (-$1d)
l207b:  ld      c,$02
        jp      lbe84
l2080:  rst     $20
        push    af
        push    af
        push    af
        push    af
        call    la466
        ld      l,$01
        push    hl
        ld      hl,$f121
        push    hl
        ld      hl,$f139
        call    lacfa
        ld      (ix-$07),c
        ld      a,(ix-$07)
        cp      $02
        jr      z,l20c3                 ; (+$24)
        ld      hl,$f345
        ld      a,($f18e)
        cp      (hl)
        jr      nz,l20ad                ; (+$05)
        ld      a,($f18f)
        inc     hl
        cp      (hl)
l20ad:  jr      z,l20c8                 ; (+$19)
        ld      hl,l215c
        push    hl
        ld      hl,$20d9
        call    lb184
        ld      (ix-$08),c
        ld      a,(ix-$08)
        cp      $02
        jr      nz,l20ce                ; (+$0b)
l20c3:  ld      c,$02
        jp      lbe84
l20c8:  ld      c,(ix-$07)
        jp      lbe84
l20ce:  ld      a,(ix-$07)
        or      (ix-$08)
        ld      (ix-$07),a
        jr      l20c8                   ; (-$11)
        rst     $30
        ld      hl,$fff9
        add     hl,sp
        ld      sp,hl
        ld      l,$01
        push    hl
        ld      hl,$f121
        push    hl
        ld      hl,$f139
        call    lacfa
        ld      (ix-$07),c
        ld      a,(ix-$07)
        cp      $02
        jr      z,l2121                 ; (+$2b)
        ld      hl,$f18c
        push    hl
        ld      hl,$f343
        push    hl
        call    lbad9
        jr      z,l2127                 ; (+$24)
        ld      a,(ix-$07)
        or      $01
        ld      (ix-$07),a
        ld      a,($f452)
        cp      $67
        jr      z,l2121                 ; (+$0f)
        call    lb8d0
        ld      a,$67
        ld      ($f452),a
        ld      l,a
        push    hl
        ld      l,$06
        call    l7f65
l2121:  ld      c,(ix-$07)
        jp      lbe72
l2127:  ld      a,($f452)
        cp      $6b
        jr      z,l2121                 ; (-$0d)
        call    lb8d0
        ld      a,$6b
        ld      ($f452),a
        ld      l,a
        push    hl
        ld      l,$06
        call    l7f65
        jr      l2121                   ; (-$1e)
        ld      (bc),a
        nop     
        ld      bc,$220b
        ld      c,$22
        ld      a,(hl)
        ld      hl,$4e20
        ld      c,a
        ld      d,h
        jr      nz,l214e                ; (+$00)
l214e:  ld      d,e
        ld      c,c
        ld      b,a
        jr      nz,l21aa                ; (+$57)
        ld      b,c
        ld      d,e
        jr      nz,l2157                ; (+$00)
l2157:  ld      d,d
        ld      c,a
        ld      c,l
        jr      nz,l215c                ; (+$00)
l215c:  rst     $20
        ld      hl,$fff9
        add     hl,sp
        ld      sp,hl
        ld      (ix-$07),$00
        ld      a,(ix+$04)
        or      a
        jr      z,l216f                 ; (+$03)
        call    lb8d0
l216f:  ld      l,$71
        rst     $08
        ld      l,$58
        rst     $08
        ld      c,(ix-$07)
        ld      hl,$213f
        jp      lb8ed
        ld      hl,l2157
        rst     $28
        ld      hl,$f18c
        push    hl
        ld      hl,$f343
        push    hl
        call    lbad9
        jr      z,l2193                 ; (+$04)
        ld      c,$67
        jr      l2195                   ; (+$02)
l2193:  ld      c,$6b
l2195:  ld      a,c
        ld      ($f452),a
        ld      l,a
        rst     $10
        ld      l,$63
        rst     $10
        ld      l,$76
        rst     $10
        ld      l,$60
        rst     $10
        ld      l,$04
        push    hl
        ld      l,$10
        push    hl
l21aa:  ld      hl,$f139
        call    l7fc5
        ld      l,$77
        rst     $10
        ld      l,$60
        rst     $10
        ld      l,$04
        push    hl
        ld      l,$10
        push    hl
        ld      hl,$f121
        call    l7fc5
        ld      a,(ix+$04)
        or      a
        jr      z,l21cc                 ; (+$04)
        ld      c,$7d
        jr      l21ce                   ; (+$02)
l21cc:  ld      c,$7f
l21ce:  ld      l,c
        rst     $10
        ld      l,$72
        rst     $08
        ld      l,$10
        call    lb11f
        ld      a,(ix+$04)
        or      a
        jr      z,l21e2                 ; (+$04)
        ld      c,$12
        jr      l21e4                   ; (+$02)
l21e2:  ld      c,$13
l21e4:  ld      l,c
        call    l7395
        ld      l,$10
        call    lb136
        ld      a,($f127)
        cp      $1b
        jr      z,l2204                 ; (+$10)
        ld      l,$7f
        push    hl
        ld      l,$ff
        call    l7f65
        call    lb8e6
        ld      c,$02
        jp      lbe84
l2204:  ld      (ix-$07),$01
        jp      l216f
        jp      l216f
        ld      hl,l214e
        rst     $28
        ld      l,$60
        rst     $10
        ld      l,$04
        push    hl
        ld      l,$10
        push    hl
        ld      hl,$f343
        call    l7fc5
        ld      hl,$f18c
        push    hl
        ld      hl,$f343
        push    hl
        call    lbad9
        jr      z,l2241                 ; (+$13)
        ld      hl,$2148
        rst     $28
        ld      l,$60
        rst     $10
        ld      l,$04
        push    hl
        ld      l,$10
        push    hl
        ld      hl,$f18c
        call    l7fc5
l2241:  ld      a,(ix+$04)
        or      a
        jr      z,l224a                 ; (+$03)
        ld      l,$7d
        rst     $10
l224a:  ld      l,$72
        rst     $08
        ld      a,(ix+$04)
        or      a
        jr      z,l2257                 ; (+$04)
        ld      c,$14
        jr      l2259                   ; (+$02)
l2257:  ld      c,$15
l2259:  ld      l,c
        call    l7395
        ld      a,($f127)
        cp      $1a
        jr      z,l2267                 ; (+$03)
        call    lb8e6
l2267:  ld      (ix-$07),$00
        jp      l216f
l226e:  rst     $20
        push    af
        push    af
        push    af
        push    af
        ld      (ix-$07),$00
        sub     a
        ld      ($f457),a
        ld      ($f458),a
l227e:  ld      a,($f13e)
        ld      e,a
        add     a,a
        sbc     a,a
        ld      d,a
        ld      a,($f457)
        sub     e
        ld      a,($f458)
        sbc     a,d
        jp      p,l22d5
        ld      hl,($f457)
        push    hl
        ld      hl,$0012
        push    hl
        call    lba2d
        pop     hl
        ld      bc,$e9ae
        add     hl,bc
        ld      ($f459),hl
        ld      bc,l0008
        add     hl,bc
        ld      a,(hl)
        cp      $02
        jr      nz,l22db                ; (+$2f)
        ld      hl,$f139
        push    hl
        ld      hl,($f459)
        push    hl
        rst     $18
        pop     af
        ld      hl,$f121
        push    hl
        ld      hl,($f459)
        inc     hl
        inc     hl
        inc     hl
        inc     hl
        push    hl
        rst     $18
        pop     af
        ld      l,$01
        call    l22fd
        ld      (ix-$08),c
        ld      a,(ix-$08)
        cp      $02
        jr      nz,l22e5                ; (+$12)
        jr      l22f8                   ; (+$23)
l22d5:  ld      c,(ix-$07)
        jp      lbe84
l22db:  ld      hl,($f457)
        inc     hl
        ld      ($f457),hl
        jp      l227e
l22e5:  ld      a,(ix-$07)
        or      (ix-$08)
        ld      (ix-$07),a
        ld      l,$01
        call    lb2ce
        ld      a,c
        cp      $02
        jr      nz,l22db                ; (-$1d)
l22f8:  ld      c,$02
        jp      lbe84
l22fd:  rst     $20
        push    af
        push    af
        push    af
        push    af
        call    la466
        ld      (ix-$07),$00
        ld      hl,$f0d4
        call    l24a5
        ld      (ix-$08),c
        ld      a,(ix-$08)
        cp      $02
        jr      z,l235b                 ; (+$42)
        ld      a,(ix-$07)
        or      (ix-$08)
        ld      (ix-$07),a
        ld      a,(ix-$07)
        or      a
        jr      nz,l2339                ; (+$11)
        ld      l,$7e
        call    l26b0
        ld      (ix-$08),c
        ld      a,(ix-$08)
        cp      $02
        jr      nz,l233f                ; (+$08)
        jr      l235b                   ; (+$22)
l2339:  ld      c,(ix-$07)
        jp      lbe84
l233f:  ld      a,(ix-$07)
        or      (ix-$08)
        ld      (ix-$07),a
        ld      a,(ix-$07)
        or      a
        jr      nz,l2339                ; (-$15)
        call    l2a88
        ld      (ix-$08),c
        ld      a,(ix-$08)
        cp      $02
        jr      nz,l2360                ; (+$05)
l235b:  ld      c,$02
        jp      lbe84
l2360:  ld      a,(ix-$07)
        or      (ix-$08)
        ld      (ix-$07),a
        jr      l2339                   ; (-$32)
        rst     $20
        push    af
        push    af
        push    af
        push    af
        ld      (ix-$07),$00
        sub     a
        ld      ($f45b),a
        ld      ($f45c),a
l237b:  ld      a,($f13e)
        ld      e,a
        add     a,a
        sbc     a,a
        ld      d,a
        ld      a,($f45b)
        sub     e
        ld      a,($f45c)
        sbc     a,d
        jp      p,l23d2
        ld      hl,($f45b)
        push    hl
        ld      hl,$0012
        push    hl
        call    lba2d
        pop     hl
        ld      bc,$e9ae
        add     hl,bc
        ld      ($f45d),hl
        ld      bc,l0008
        add     hl,bc
        ld      a,(hl)
        cp      $02
        jr      nz,l23d8                ; (+$2f)
        ld      hl,$f139
        push    hl
        ld      hl,($f45d)
        push    hl
        rst     $18
        pop     af
        ld      hl,$f121
        push    hl
        ld      hl,($f45d)
        inc     hl
        inc     hl
        inc     hl
        inc     hl
        push    hl
        rst     $18
        pop     af
        ld      l,$01
        call    l23fa
        ld      (ix-$08),c
        ld      a,(ix-$08)
        cp      $02
        jr      nz,l23e2                ; (+$12)
        jr      l23f5                   ; (+$23)
l23d2:  ld      c,(ix-$07)
        jp      lbe84
l23d8:  ld      hl,($f45b)
        inc     hl
        ld      ($f45b),hl
        jp      l237b
l23e2:  ld      a,(ix-$07)
        or      (ix-$08)
        ld      (ix-$07),a
        ld      l,$01
        call    lb2ce
        ld      a,c
        cp      $02
        jr      nz,l23d8                ; (-$1d)
l23f5:  ld      c,$02
        jp      lbe84
l23fa:  rst     $20
        push    af
        push    af
        push    af
        push    af
        call    la466
        ld      (ix-$07),$00
        ld      hl,$f0d4
        call    l24a5
        ld      (ix-$08),c
        ld      a,(ix-$08)
        cp      $02
        jp      z,l2494
        ld      a,(ix-$07)
        or      (ix-$08)
        ld      (ix-$07),a
        ld      l,$01
        call    lb2ce
        ld      a,c
        cp      $02
        jp      z,l2494
        ld      a,(ix-$07)
        or      a
        jr      nz,l2442                ; (+$11)
        ld      l,$7e
        call    l26b0
        ld      (ix-$08),c
        ld      a,(ix-$08)
        cp      $02
        jr      nz,l2448                ; (+$08)
        jr      l2494                   ; (+$52)
l2442:  ld      c,(ix-$07)
        jp      lbe84
l2448:  ld      a,(ix-$07)
        or      (ix-$08)
        ld      (ix-$07),a
        ld      l,$01
        call    lb2ce
        ld      a,c
        cp      $02
        jr      z,l2494                 ; (+$39)
        ld      a,(ix-$07)
        or      a
        jr      nz,l2442                ; (-$1f)
        call    l2f4f
        ld      (ix-$08),c
        ld      a,(ix-$08)
        cp      $02
        jr      z,l2494                 ; (+$26)
        ld      a,(ix-$07)
        or      (ix-$08)
        ld      (ix-$07),a
        ld      l,$01
        call    lb2ce
        ld      a,c
        cp      $02
        jr      z,l2494                 ; (+$13)
        ld      a,(ix-$07)
        or      a
        jr      nz,l2442                ; (-$45)
        call    l325f
        ld      (ix-$08),c
        ld      a,(ix-$08)
        cp      $02
        jr      nz,l2499                ; (+$05)
l2494:  ld      c,$02
        jp      lbe84
l2499:  ld      a,(ix-$07)
        or      (ix-$08)
        ld      (ix-$07),a
        jp      l2442
l24a5:  rst     $20
        push    af
        push    af
        push    af
        push    af
        ld      (ix-$07),$00
        ld      hl,$f469
        push    hl
        ld      l,(ix+$04)
        ld      h,(ix+$05)
        push    hl
        rst     $18
        pop     af
        ld      hl,$f463
        push    hl
        ld      hl,$f139
        push    hl
        rst     $18
        pop     af
l24c5:  ld      hl,$f19c
        push    hl
        ld      hl,$f463
        push    hl
        rst     $18
        pop     af
        ld      l,$0d
        call    l8b1d
        ld      (ix-$08),c
        ld      a,(ix-$08)
        cp      $02
        jp      z,l2541
        ld      a,(ix-$07)
        or      (ix-$08)
        ld      (ix-$07),a
        ld      hl,$f347
        push    hl
        ld      hl,$f469
        push    hl
        call    lba8d
        pop     hl
        ld      a,(hl)
        inc     hl
        or      (hl)
        inc     hl
        or      (hl)
        inc     hl
        or      (hl)
        jr      z,l2513                 ; (+$16)
        ld      hl,l2571
        push    hl
        ld      hl,$25e9
        call    lb184
        ld      (ix-$08),c
        ld      a,(ix-$08)
        cp      $02
        jr      nz,l2526                ; (+$15)
        jr      l2541                   ; (+$2e)
l2513:  ld      hl,$f463
        push    hl
        ld      hl,$f121
        push    hl
        call    lbad9
        jr      nz,l2531                ; (+$11)
        ld      c,(ix-$07)
        jp      lbe84
l2526:  ld      a,(ix-$07)
        or      (ix-$08)
        ld      (ix-$07),a
        jr      l2513                   ; (-$1e)
l2531:  ld      a,($f19e)
        or      a
        jr      nz,l2546                ; (+$0f)
        ld      l,$01
        call    lb2ce
        ld      a,c
        cp      $02
        jr      nz,l2546                ; (+$05)
l2541:  ld      c,$02
        jp      lbe84
l2546:  ld      hl,$f463
        push    hl
        ld      a,($f0b6)
        ld      ($f937),a
        add     a,a
        sbc     a,a
        ld      ($f938),a
        ld      ($f936),a
        ld      ($f935),a
        ld      hl,$f935
        push    hl
        call    lba62
        pop     af
        jp      l24c5
        jr      nz,l25aa                ; (+$42)
        ld      d,h
        ld      d,e
        jr      nz,l256c                ; (+$00)
l256c:  ld      d,d
        cpl     
        ld      d,a
        jr      nz,l2571                ; (+$00)
l2571:  rst     $20
        ld      a,(ix+$04)
        or      a
        jp      z,l25ca
        ld      l,$71
        rst     $08
        ld      l,$58
        rst     $08
        ld      hl,l256c
        rst     $28
        ld      a,$67
        ld      ($f467),a
        ld      l,a
        rst     $10
        ld      l,$63
        rst     $10
        ld      l,$76
        rst     $10
        ld      l,$04
        push    hl
        ld      l,$10
        push    hl
        ld      hl,$f463
        call    l7fc5
        ld      hl,$2566
        rst     $28
        ld      l,$60
        rst     $10
        ld      hl,$f45f
        push    hl
        ld      hl,$f347
l25aa:  push    hl
        rst     $18
        pop     af
        ld      a,($f0d8)
        add     a,a
        ld      l,a
        ld      a,l
        ld      ($f468),a
        ld      l,a
        push    hl
        ld      l,$10
        push    hl
        ld      hl,$f45f
        call    l7fc5
        ld      l,$7d
        rst     $10
        ld      l,$72
        rst     $08
        call    lb8d0
l25ca:  ld      a,(ix+$04)
        or      a
        jr      z,l25d4                 ; (+$04)
        ld      c,$0a
        jr      l25d6                   ; (+$02)
l25d4:  ld      c,$10
l25d6:  ld      l,c
        call    l767c
        ld      a,c
        or      a
        jr      z,l25ca                 ; (-$14)
        ld      l,$7f
        push    hl
        ld      l,$ff
        call    l7f65
        jp      lbe84
        rst     $30
        ld      hl,$fff9
        add     hl,sp
        ld      sp,hl
        ld      l,$0d
        call    l8b1d
        ld      (ix-$07),c
        ld      a,(ix-$07)
        cp      $02
        jr      z,l2634                 ; (+$36)
        ld      hl,$f347
        push    hl
        ld      hl,$f469
        push    hl
        call    lba8d
        pop     hl
        ld      a,(hl)
        inc     hl
        or      (hl)
        inc     hl
        or      (hl)
        inc     hl
        or      (hl)
        jr      z,l263a                 ; (+$27)
        ld      a,(ix-$07)
        or      $01
        ld      (ix-$07),a
        ld      a,($f467)
        cp      $67
        jp      z,l267e
        call    lb8d0
        ld      a,$67
        ld      ($f467),a
        ld      l,a
        push    hl
        ld      l,$06
        call    l7f65
        jr      l267e                   ; (+$4a)
l2634:  ld      c,(ix-$07)
        jp      lbe72
l263a:  ld      a,(ix-$07)
        or      $00
        ld      (ix-$07),a
        ld      a,($f467)
        cp      $6b
        jr      z,l2634                 ; (-$15)
        call    lb8d0
        ld      l,$71
        rst     $08
        ld      a,$6b
        ld      ($f467),a
        ld      l,a
        push    hl
        ld      l,$06
        call    l7f65
        sub     a
        ld      ($f45f),a
        ld      ($f460),a
        ld      ($f461),a
        ld      ($f462),a
        ld      l,$59
        rst     $08
        ld      a,($f468)
        ld      l,a
        push    hl
        ld      l,$10
        push    hl
        ld      hl,$f45f
        call    l7fc5
        ld      l,$72
        rst     $08
        jr      l2634                   ; (-$4a)
l267e:  ld      hl,$f347
        push    hl
        ld      hl,$f45f
        push    hl
        call    lbad9
        jp      z,l2634
        ld      l,$71
        rst     $08
        ld      hl,$f45f
        push    hl
        ld      hl,$f347
        push    hl
        rst     $18
        pop     af
        ld      l,$59
        rst     $08
        ld      a,($f468)
        ld      l,a
        push    hl
        ld      l,$10
        push    hl
        ld      hl,$f45f
        call    l7fc5
        ld      l,$72
        rst     $08
        jp      l2634
l26b0:  rst     $20
        ld      hl,$fff2
        add     hl,sp
        ld      sp,hl
        ld      a,(ix+$04)
        ld      ($f47e),a
        ld      (ix-$0d),$00
        ld      a,($f47e)
        cp      $6c
        jr      nz,l26d7                ; (+$10)
        ld      hl,$f471
        push    hl
        ld      hl,$043d
        push    hl
        rst     $18
        pop     af
        ld      (ix-$07),$1f
        jr      l26ea                   ; (+$13)
l26d7:  ld      hl,$f471
        push    hl
        ld      hl,$f0d4
        push    hl
        rst     $18
        pop     af
        ld      a,($f0d9)
        add     a,$ff
        ld      l,a
        ld      (ix-$07),l
l26ea:  ld      hl,$f19c
        push    hl
        ld      a,($f47e)
        cp      $7e
        jr      nz,l26fe                ; (+$09)
        ld      hl,$f139
        ld      de,$f935
        rst     $38
        jr      l2705                   ; (+$07)
l26fe:  ld      hl,$f0c1
        ld      de,$f935
        rst     $38
l2705:  ld      hl,$f935
        push    hl
        rst     $18
        pop     af
        sub     a
        ld      (ix-$0c),a
        ld      (ix-$0b),a
        ld      (ix-$0a),a
        ld      (ix-$09),a
        ld      ($f475),a
        ld      ($f476),a
l271e:  ld      a,(ix-$07)
        ld      e,a
        add     a,a
        sbc     a,a
        ld      d,a
        ld      a,($f475)
        sub     e
        ld      a,($f476)
        sbc     a,d
        jp      p,l2740
        call    l28ef
        ld      (ix-$0e),c
        ld      a,(ix-$0e)
        cp      $02
        jr      nz,l274f                ; (+$12)
        jp      l2827
l2740:  ld      c,(ix-$0d)
        jp      lbe84
l2746:  ld      hl,($f475)
        inc     hl
        ld      ($f475),hl
        jr      l271e                   ; (-$31)
l274f:  ld      a,(ix-$0d)
        or      (ix-$0e)
        ld      (ix-$0d),a
        ld      hl,$f46d
        ld      a,(hl)
        inc     hl
        or      (hl)
        inc     hl
        or      (hl)
        inc     hl
        or      (hl)
        jr      z,l2746                 ; (-$1e)
        ld      a,(ix-$07)
        ld      ($f47c),a
        add     a,a
        sbc     a,a
        ld      ($f47d),a
l276f:  ld      hl,$f475
        ld      a,($f47c)
        sub     (hl)
        ld      a,($f47d)
        inc     hl
        sbc     a,(hl)
        jp      m,l2746
        ld      hl,($f47c)
        add     hl,hl
        add     hl,hl
        ld      bc,$033d
        add     hl,bc
        ld      de,$f935
        rst     $38
        ld      hl,$f935
        push    hl
        ld      hl,$f46d
        push    hl
        call    lba8d
        pop     hl
        ld      a,(hl)
        inc     hl
        or      (hl)
        inc     hl
        or      (hl)
        inc     hl
        or      (hl)
        jr      z,l27d6                 ; (+$36)
        ld      hl,$f475
        ld      a,($f47c)
        cp      (hl)
        jr      nz,l27ae                ; (+$05)
        ld      a,($f47d)
        inc     hl
        cp      (hl)
l27ae:  jr      nz,l27e9                ; (+$39)
        ld      hl,($f475)
        add     hl,hl
        add     hl,hl
        ld      bc,$033d
        add     hl,bc
        ld      de,$f935
        rst     $38
        ld      hl,$f935
        push    hl
        push    ix
        pop     bc
        ld      hl,$fff4
        add     hl,bc
        push    hl
        call    lba8d
        pop     hl
        ld      a,(hl)
        inc     hl
        or      (hl)
        inc     hl
        or      (hl)
        inc     hl
        or      (hl)
        jr      z,l27e9                 ; (+$13)
l27d6:  ld      a,($f47c)
        sub     $01
        ld      ($f47c),a
        ld      a,($f47d)
        sbc     a,$00
        ld      ($f47d),a
        jp      l276f
l27e9:  push    ix
        pop     bc
        ld      hl,$fff4
        add     hl,bc
        push    hl
        ld      hl,($f47c)
        add     hl,hl
        add     hl,hl
        ld      bc,$033d
        add     hl,bc
        ld      de,$f935
        rst     $38
        ld      hl,$f935
        push    hl
        ld      hl,($f475)
        add     hl,hl
        add     hl,hl
        ld      bc,$033d
        add     hl,bc
        push    hl
        call    lbdd4
        call    lbdd4
        pop     af
        ld      hl,l2979
        push    hl
        ld      hl,$2a08
        call    lb184
        ld      (ix-$0e),c
        ld      a,(ix-$0e)
        cp      $02
        jr      nz,l282c                ; (+$05)
l2827:  ld      c,$02
        jp      lbe84
l282c:  ld      a,(ix-$0d)
        or      (ix-$0e)
        ld      (ix-$0d),a
        jp      l27d6
l2838:  rst     $30
        push    af
        push    af
        push    af
        push    af
        ld      (ix-$07),$00
        ld      a,($f47e)
        cp      $6c
        jr      nz,l2863                ; (+$1b)
        ld      hl,$f19c
        push    hl
        ld      hl,$f477
        push    hl
        rst     $18
        pop     af
        ld      l,$09
        call    l8b1d
        ld      (ix-$08),c
        ld      a,(ix-$08)
        cp      $02
        jr      nz,l2885                ; (+$24)
        jr      l28a0                   ; (+$3d)
l2863:  ld      hl,$f198
        push    hl
        ld      hl,$f477
        push    hl
        rst     $18
        pop     af
        ld      a,($f47e)
        cp      $7e
        jr      nz,l2891                ; (+$1d)
        ld      l,$03
        call    l8b1d
        ld      (ix-$08),c
        ld      a,(ix-$08)
        cp      $02
        jr      nz,l28a5                ; (+$22)
        jr      l28a0                   ; (+$1b)
l2885:  ld      a,(ix-$07)
        or      (ix-$08)
        ld      (ix-$07),a
        jp      l28e9
l2891:  ld      l,$07
        call    l8b1d
        ld      (ix-$08),c
        ld      a,(ix-$08)
        cp      $02
        jr      nz,l28e0                ; (+$40)
l28a0:  ld      c,$02
        jp      lbe72
l28a5:  ld      a,(ix-$07)
        or      (ix-$08)
        ld      (ix-$07),a
        ld      l,$05
        call    l8b1d
        ld      (ix-$08),c
        ld      a,(ix-$08)
        cp      $02
        jr      z,l28a0                 ; (-$1d)
        ld      a,(ix-$07)
        or      (ix-$08)
        ld      (ix-$07),a
        ld      hl,$f347
        push    hl
        ld      hl,$f477
        ld      de,$f935
        rst     $38
        ld      hl,$f935
        push    hl
        ld      hl,$f198
        push    hl
        call    lbe23
        rst     $18
        pop     af
        jr      l28e9                   ; (+$09)
l28e0:  ld      a,(ix-$07)
        or      (ix-$08)
        ld      (ix-$07),a
l28e9:  ld      c,(ix-$07)
        jp      lbe72
l28ef:  rst     $30
        push    af
        push    af
        push    af
        push    af
        ld      (ix-$07),$00
        ld      hl,$f477
        push    hl
        ld      hl,($f475)
        add     hl,hl
        add     hl,hl
        ld      bc,$033d
        add     hl,bc
        push    hl
        rst     $18
        pop     af
        call    l2838
        ld      (ix-$08),c
        ld      a,(ix-$08)
        cp      $02
        jr      z,l294d                 ; (+$38)
        ld      a,(ix-$07)
        or      (ix-$08)
        ld      (ix-$07),a
        ld      hl,$f46d
        push    hl
        ld      hl,$f347
        push    hl
        rst     $18
        pop     af
        ld      hl,$f477
        push    hl
        ld      hl,$f471
        ld      de,$f935
        rst     $38
        ld      hl,$f935
        push    hl
        ld      hl,$f477
        push    hl
        call    lbe23
        rst     $18
        pop     af
        call    l2838
        ld      (ix-$08),c
        ld      a,(ix-$08)
        cp      $02
        jr      nz,l2952                ; (+$05)
l294d:  ld      c,$02
        jp      lbe72
l2952:  ld      a,(ix-$07)
        or      (ix-$08)
        ld      (ix-$07),a
        ld      hl,$f46d
        push    hl
        ld      hl,$f347
        push    hl
        call    lbdd4
        pop     af
        ld      c,(ix-$07)
        jp      lbe72
        jr      nz,l29b0                ; (+$41)
        ld      c,(hl)
        ld      b,h
        jr      nz,l2973                ; (+$00)
l2973:  ld      b,d
        ld      c,c
        ld      d,h
        ld      d,e
        jr      nz,l2979                ; (+$00)
l2979:  rst     $20
        ld      a,(ix+$04)
        or      a
        jp      z,l29e1
        ld      l,$71
        rst     $08
        ld      l,$58
        rst     $08
        ld      a,($f47e)
        ld      l,a
        rst     $10
        ld      hl,l2973
        rst     $28
        ld      l,$60
        rst     $10
        ld      a,($f475)
        ld      ($f0c7),a
        ld      l,$01
        push    hl
        ld      l,$0a
        push    hl
        ld      hl,$f0c5
        call    l7fc5
        ld      hl,$f47c
        ld      a,($f475)
        cp      (hl)
        jr      nz,l29b3                ; (+$05)
        ld      a,($f476)
        inc     hl
        cp      (hl)
l29b3:  jr      z,l29ce                 ; (+$19)
        ld      hl,$296d
        rst     $28
        ld      l,$60
        rst     $10
        ld      a,($f47c)
        ld      ($f0c7),a
        ld      l,$01
        push    hl
        ld      l,$0a
        push    hl
        ld      hl,$f0c5
        call    l7fc5
l29ce:  ld      l,$63
        rst     $10
        ld      a,$70
        ld      ($f47b),a
        ld      l,a
        rst     $10
        ld      l,$7d
        rst     $10
        ld      l,$72
        rst     $08
        call    lb8d0
l29e1:  ld      a,(ix+$04)
        ld      e,a
        add     a,a
        sbc     a,a
        ld      d,a
        ld      a,e
        or      $80
        ld      e,a
        or      d
        jr      z,l29f3                 ; (+$04)
        ld      c,$0a
        jr      l29f5                   ; (+$02)
l29f3:  ld      c,$10
l29f5:  ld      l,c
        call    l767c
        ld      a,c
        or      a
        jr      z,l29e1                 ; (-$1c)
        ld      l,$7f
        push    hl
        ld      l,$ff
        call    l7f65
        jp      lbe84
        rst     $30
        push    af
        push    af
        push    af
        push    af
        ld      (ix-$07),$00
        call    l28ef
        ld      (ix-$08),c
        ld      a,(ix-$08)
        cp      $02
        jr      nz,l2a23                ; (+$05)
        ld      c,$02
        jp      lbe72
l2a23:  ld      a,(ix-$07)
        or      (ix-$08)
        ld      (ix-$07),a
        ld      hl,($f47c)
        add     hl,hl
        add     hl,hl
        ld      bc,$033d
        add     hl,bc
        ld      de,$f935
        rst     $38
        ld      hl,$f935
        push    hl
        ld      hl,$f46d
        push    hl
        call    lba8d
        pop     hl
        ld      a,(hl)
        inc     hl
        or      (hl)
        inc     hl
        or      (hl)
        inc     hl
        or      (hl)
        jr      z,l2a66                 ; (+$18)
        ld      a,($f47b)
        cp      $70
        jr      z,l2a7e                 ; (+$29)
        call    lb8d0
        ld      a,$70
        ld      ($f47b),a
        ld      l,a
        push    hl
        ld      l,$fe
        call    l7f65
        jr      l2a7e                   ; (+$18)
l2a66:  ld      a,($f47b)
        cp      $66
        jr      z,l2a82                 ; (+$15)
        call    lb8d0
        ld      a,$66
        ld      ($f47b),a
        ld      l,a
        push    hl
        ld      l,$fe
        call    l7f65
        jr      l2a82                   ; (+$04)
l2a7e:  ld      (ix-$07),$01
l2a82:  ld      c,(ix-$07)
        jp      lbe72
l2a88:  rst     $30
        push    af
        push    af
        push    af
        push    af
        ld      (ix-$07),$00
        ld      hl,$f19c
        push    hl
        ld      hl,$f139
        push    hl
        rst     $18
        pop     af
l2a9b:  ld      hl,$f121
        push    hl
        ld      hl,$f19c
        push    hl
        call    lbab0
        jr      c,l2ad3                 ; (+$2b)
        ld      hl,$f198
        push    hl
        ld      hl,$f19c
        inc     hl
        inc     hl
        ld      c,(hl)
        inc     hl
        ld      b,(hl)
        push    bc
        dec     hl
        dec     hl
        dec     hl
        ld      c,(hl)
        inc     hl
        ld      b,(hl)
        push    bc
        pop     hl
        call    l2cae
        ld      l,$03
        call    l8b1d
        ld      (ix-$08),c
        ld      a,(ix-$08)
        cp      $02
        jp      nz,l2b27
        jp      l2c6b
l2ad3:  ld      hl,$f488
        push    hl
        ld      hl,$f139
        push    hl
        rst     $18
        pop     af
l2add:  ld      hl,$f488
        push    hl
        ld      hl,$f121
        push    hl
        call    lbab0
        jp      nc,l2c7c
        ld      hl,$f19c
        push    hl
        ld      hl,$f488
        push    hl
        rst     $18
        pop     af
        ld      l,$05
        call    l8b1d
        ld      (ix-$08),c
        ld      a,(ix-$08)
        cp      $02
        jr      nz,l2b63                ; (+$5f)
        jp      l2c6b
l2b07:  ld      hl,$f19c
        push    hl
        ld      a,($f0b6)
        ld      ($f937),a
        add     a,a
        sbc     a,a
        ld      ($f938),a
        ld      ($f936),a
        ld      ($f935),a
        ld      hl,$f935
        push    hl
        call    lba62
        pop     af
        jp      l2a9b
l2b27:  ld      a,(ix-$07)
        or      (ix-$08)
        ld      (ix-$07),a
        ld      a,($f19e)
        or      a
        jr      nz,l2b07                ; (-$2f)
        ld      l,$01
        call    lb2ce
        ld      a,c
        cp      $02
        jr      nz,l2b07                ; (-$39)
        jp      l2c6b
l2b43:  ld      hl,$f488
        push    hl
        ld      a,($f0b6)
        ld      ($f937),a
        add     a,a
        sbc     a,a
        ld      ($f938),a
        ld      ($f936),a
        ld      ($f935),a
        ld      hl,$f935
        push    hl
        call    lba62
        pop     af
        jp      l2add
l2b63:  ld      a,(ix-$07)
        or      (ix-$08)
        ld      (ix-$07),a
        ld      a,($f19e)
        or      a
        jr      nz,l2b7d                ; (+$0b)
        ld      l,$01
        call    lb2ce
        ld      a,c
        cp      $02
        jp      z,l2c6b
l2b7d:  ld      hl,$f483
        push    hl
        ld      hl,$f488
        inc     hl
        inc     hl
        ld      c,(hl)
        inc     hl
        ld      b,(hl)
        push    bc
        dec     hl
        dec     hl
        dec     hl
        ld      c,(hl)
        inc     hl
        ld      b,(hl)
        push    bc
        pop     hl
        call    l2cae
        ld      hl,$f483
        push    hl
        ld      hl,$f198
        push    hl
        call    lbad9
        jr      z,l2b43                 ; (-$5f)
        ld      a,($f0b6)
        add     a,$ff
        ld      l,a
        ld      a,l
        ld      ($f487),a
l2bac:  ld      a,($f487)
        cp      $20
        jp      p,l2b43
        ld      l,$01
        call    lb2ce
        ld      a,c
        cp      $02
        jr      nz,l2bcb                ; (+$0d)
        jp      l2c6b
l2bc1:  ld      a,($f487)
        add     a,$01
        ld      ($f487),a
        jr      l2bac                   ; (-$1f)
l2bcb:  ld      hl,$f47f
        push    hl
        ld      a,($f487)
        ld      c,a
        add     a,a
        sbc     a,a
        ld      b,a
        ld      l,c
        ld      h,b
        add     hl,hl
        add     hl,hl
        ld      bc,$033d
        add     hl,bc
        push    hl
        rst     $18
        pop     hl
        ld      de,$f935
        rst     $38
        ld      hl,$f935
        push    hl
        ld      hl,$f488
        push    hl
        call    lba8d
        pop     hl
        ld      a,(hl)
        inc     hl
        or      (hl)
        inc     hl
        or      (hl)
        inc     hl
        or      (hl)
        jr      nz,l2bc1                ; (-$39)
        ld      hl,$f121
        push    hl
        ld      hl,$f48d
        push    hl
        ld      hl,$f488
        ld      de,$f935
        rst     $38
        ld      hl,$f935
        push    hl
        ld      hl,$f47f
        push    hl
        call    lbdd4
        rst     $18
        call    lbab0
        jp      c,l2b43
        ld      hl,$f491
        push    hl
        ld      hl,$f48d
        inc     hl
        inc     hl
        ld      c,(hl)
        inc     hl
        ld      b,(hl)
        push    bc
        dec     hl
        dec     hl
        dec     hl
        ld      c,(hl)
        inc     hl
        ld      b,(hl)
        push    bc
        pop     hl
        call    l2cae
        call    l2ec0
        ld      (ix-$08),c
        ld      a,(ix-$08)
        cp      $02
        jr      z,l2c6b                 ; (+$2b)
        ld      a,(ix-$07)
        or      (ix-$08)
        ld      (ix-$07),a
        ld      hl,$f198
        push    hl
        ld      hl,$f483
        push    hl
        call    lbad9
        jp      z,l2bc1
        ld      hl,l2de6
        push    hl
        ld      hl,$2e53
        call    lb184
        ld      (ix-$08),c
        ld      a,(ix-$08)
        cp      $02
        jr      nz,l2c70                ; (+$05)
l2c6b:  ld      c,$02
        jp      lbe72
l2c70:  ld      a,(ix-$07)
        or      (ix-$08)
        ld      (ix-$07),a
        jp      l2bc1
l2c7c:  ld      c,(ix-$07)
        jp      lbe72
        ld      bc,$0402
        ex      af,af'
        djnz    l2ca8                   ; (+$20)
        ld      b,b
        add     a,b
        sub     (hl)
        ld      l,c
        ld      l,c
        sub     (hl)
        ld      l,c
        sub     (hl)
        sub     (hl)
        ld      l,c
        ld      l,c
        sub     (hl)
        sub     (hl)
        ld      l,c
        sub     (hl)
        ld      l,c
        ld      l,c
        sub     (hl)
        ld      l,c
        sub     (hl)
        sub     (hl)
        ld      l,c
        sub     (hl)
        ld      l,c
        ld      l,c
        sub     (hl)
        sub     (hl)
        ld      l,c
        ld      l,c
        sub     (hl)
        ld      l,c
        sub     (hl)
l2ca8:  sub     (hl)
        ld      l,c
        nop     
        nop     
        nop     
        nop     
l2cae:  rst     $20
        ld      hl,$fff2
        add     hl,sp
        ld      sp,hl
        ld      l,(ix+$08)
        ld      h,(ix+$09)
        push    hl
        push    ix
        pop     bc
        ld      hl,l0004
        add     hl,bc
        push    hl
        rst     $18
        pop     af
l2cc5:  push    ix
        pop     bc
        ld      hl,l0004
        add     hl,bc
        push    hl
        ld      a,($f0d9)
        ld      l,a
        ld      c,l
        sub     a
        ld      b,a
        push    bc
        call    lbd0f
        pop     hl
        ld      a,(hl)
        inc     hl
        or      (hl)
        inc     hl
        or      (hl)
        inc     hl
        or      (hl)
        jr      z,l2cf7                 ; (+$15)
        ld      l,(ix+$08)
        ld      h,(ix+$09)
        push    hl
        push    ix
        pop     bc
        ld      hl,l0004
        add     hl,bc
        push    hl
        call    lba62
        pop     af
        jr      l2cc5                   ; (-$32)
l2cf7:  ld      l,(ix+$08)
        ld      h,(ix+$09)
        push    hl
        ld      hl,$f0d4
        push    hl
        call    lba8d
        pop     af
        sub     a
        ld      ($f495),a
        ld      ($f496),a
l2d0d:  ld      a,($f496)
        cp      $04
        jp      nc,l2d66
        ld      l,(ix+$08)
        ld      h,(ix+$09)
        ld      a,($f496)
        ld      e,a
        sub     a
        ld      d,a
        add     hl,de
        ld      a,(hl)
        ld      ($f497),a
        ld      c,a
        sub     a
        ld      b,a
        push    bc
        ld      hl,$0003
        push    hl
        call    lb9de
        pop     hl
        ld      bc,$2c8a
        add     hl,bc
        ld      l,(hl)
        push    hl
        ld      a,($f497)
        and     $07
        ld      l,a
        ld      c,l
        sub     a
        ld      b,a
        ld      l,c
        ld      h,b
        ld      bc,$2c82
        add     hl,bc
        pop     bc
        ld      a,c
        and     (hl)
        jr      z,l2d51                 ; (+$05)
        ld      bc,$0001
        jr      l2d54                   ; (+$03)
l2d51:  ld      bc,l0000
l2d54:  ld      a,($f495)
        xor     c
        ld      ($f495),a
        ld      a,($f496)
        add     a,$01
        ld      ($f496),a
        jp      l2d0d
l2d66:  ld      a,($f495)
        or      a
        jp      z,l2dd0
        ld      l,(ix+$08)
        ld      h,(ix+$09)
        push    hl
        ld      l,(ix+$08)
        ld      h,(ix+$09)
        ld      de,$f935
        rst     $38
        ld      hl,$f935
        push    hl
        ld      hl,$0001
        push    hl
        call    lbd0f
        ld      hl,$f0d4
        push    hl
        call    lbe23
        push    ix
        pop     bc
        ld      hl,$fff2
        add     hl,bc
        ld      e,l
        ld      d,h
        pop     hl
        push    de
        call    lb90d
        ld      l,(ix+$08)
        ld      h,(ix+$09)
        inc     hl
        inc     hl
        ld      a,(hl)
        and     $01
        jr      z,l2db4                 ; (+$09)
        ld      hl,$2caa
        ld      de,$f935
        rst     $38
        jr      l2dc7                   ; (+$13)
l2db4:  ld      a,($f0d9)
        add     a,a
        add     a,a
        ld      l,a
        ld      c,l
        sub     a
        ld      b,a
        ld      l,c
        ld      h,b
        ld      bc,$0339
        add     hl,bc
        ld      de,$f935
        rst     $38
l2dc7:  ld      hl,$f935
        push    hl
        call    lbdd4
        rst     $18
        pop     af
l2dd0:  jp      lbe93
        jr      nz,l2e17                ; (+$42)
        ld      c,c
        ld      d,h
        jr      nz,l2dd9                ; (+$00)
l2dd9:  jr      nz,l2e1b                ; (+$40)
        jr      nz,l2ddd                ; (+$00)
l2ddd:  ld      d,d
        ld      b,c
        ld      c,l
        jr      nz,l2e26                ; (+$44)
        ld      b,e
        ld      b,h
        jr      nz,l2de6                ; (+$00)
l2de6:  rst     $20
        ld      a,(ix+$04)
        or      a
        jp      z,l2e34
        ld      l,$71
        rst     $08
        ld      l,$58
        rst     $08
        ld      hl,l2ddd
        rst     $28
        ld      a,$67
        ld      ($f48c),a
        ld      l,a
        rst     $10
        ld      hl,l2dd9
        rst     $28
        ld      l,$60
        rst     $10
        ld      l,$04
        push    hl
        ld      l,$10
        push    hl
        ld      hl,$f488
        call    l7fc5
        ld      hl,$2dd3
        rst     $28
        ld      l,$60
        rst     $10
        ld      a,($f487)
        ld      ($f0c7),a
        ld      l,$01
        push    hl
        ld      l,$0a
        push    hl
        ld      hl,$f0c5
        call    l7fc5
        ld      l,$7d
        rst     $10
        ld      l,$72
        rst     $08
        call    lb8d0
l2e34:  ld      a,(ix+$04)
        or      a
        jr      z,l2e3e                 ; (+$04)
        ld      c,$0a
        jr      l2e40                   ; (+$02)
l2e3e:  ld      c,$10
l2e40:  ld      l,c
        call    l767c
        ld      a,c
        or      a
        jr      z,l2e34                 ; (-$14)
        ld      l,$7f
        push    hl
        ld      l,$ff
        call    l7f65
        jp      lbe84
        rst     $30
        push    af
        push    af
        push    af
        push    af
        ld      (ix-$07),$00
        call    l2ec0
        ld      (ix-$08),c
        ld      a,(ix-$08)
        cp      $02
        jr      nz,l2e6e                ; (+$05)
        ld      c,$02
        jp      lbe72
l2e6e:  ld      a,(ix-$07)
        or      (ix-$08)
        ld      (ix-$07),a
        ld      hl,$f198
        push    hl
        ld      hl,$f483
        push    hl
        call    lbad9
        jr      nz,l2e9c                ; (+$18)
        ld      a,($f48c)
        cp      $6b
        jr      z,l2eba                 ; (+$2f)
        ld      a,$6b
        ld      ($f48c),a
        ld      l,a
        push    hl
        ld      l,$0a
        call    l7f65
        call    lb8d0
        jr      l2eba                   ; (+$1e)
l2e9c:  ld      a,(ix-$07)
        or      $01
        ld      (ix-$07),a
        ld      a,($f48c)
        cp      $67
        jr      z,l2eba                 ; (+$0f)
        ld      a,$67
        ld      ($f48c),a
        ld      l,a
        push    hl
        ld      l,$0a
        call    l7f65
        call    lb8d0
l2eba:  ld      c,(ix-$07)
        jp      lbe72
l2ec0:  rst     $30
        push    af
        push    af
        push    af
        push    af
        ld      (ix-$07),$00
        ld      hl,$f19c
        push    hl
        ld      hl,$f488
        push    hl
        rst     $18
        pop     af
        ld      hl,$f198
        push    hl
        ld      hl,$f483
        push    hl
        rst     $18
        pop     af
        ld      l,$03
        call    l8b1d
        ld      (ix-$08),c
        ld      a,(ix-$08)
        cp      $02
        jp      z,l2f3b
        ld      a,(ix-$07)
        or      (ix-$08)
        ld      (ix-$07),a
        ld      hl,$f19c
        push    hl
        ld      hl,$f48d
        push    hl
        rst     $18
        pop     af
        ld      hl,$f198
        push    hl
        ld      hl,$f491
        push    hl
        rst     $18
        pop     af
        ld      l,$03
        call    l8b1d
        ld      (ix-$08),c
        ld      a,(ix-$08)
        cp      $02
        jr      z,l2f3b                 ; (+$22)
        ld      a,(ix-$07)
        or      (ix-$08)
        ld      (ix-$07),a
        ld      hl,$f19c
        push    hl
        ld      hl,$f488
        push    hl
        rst     $18
        pop     af
        ld      l,$05
        call    l8b1d
        ld      (ix-$08),c
        ld      a,(ix-$08)
        cp      $02
        jr      nz,l2f40                ; (+$05)
l2f3b:  ld      c,$02
        jp      lbe72
l2f40:  ld      a,(ix-$07)
        or      (ix-$08)
        ld      (ix-$07),a
        ld      c,(ix-$07)
        jp      lbe72
l2f4f:  rst     $30
        push    af
        push    af
        push    af
        push    af
        ld      (ix-$07),$00
        ld      hl,$f498
        push    hl
        ld      hl,$f139
        push    hl
        rst     $18
        pop     af
l2f62:  ld      hl,$f498
        push    hl
        ld      hl,$f121
        push    hl
        call    lbab0
        jr      nc,l2f98                ; (+$29)
        ld      hl,$f19c
        push    hl
        ld      hl,$f498
        push    hl
        rst     $18
        pop     af
        sub     a
        ld      ($f198),a
        ld      ($f199),a
        ld      ($f19a),a
        ld      ($f19b),a
        ld      l,$03
        call    l8b1d
        ld      (ix-$08),c
        ld      a,(ix-$08)
        cp      $02
        jr      nz,l2fbe                ; (+$29)
        jp      l30ea
l2f98:  ld      c,(ix-$07)
        jp      lbe72
l2f9e:  ld      hl,$f498
        push    hl
        ld      a,($f0b6)
        ld      ($f937),a
        add     a,a
        sbc     a,a
        ld      ($f938),a
        ld      ($f936),a
        ld      ($f935),a
        ld      hl,$f935
        push    hl
        call    lba62
        pop     af
        jp      l2f62
l2fbe:  ld      a,(ix-$07)
        or      (ix-$08)
        ld      (ix-$07),a
        ld      a,($f19e)
        and     $0f
        jr      nz,l2fd9                ; (+$0b)
        ld      l,$01
        call    lb2ce
        ld      a,c
        cp      $02
        jp      z,l30ea
l2fd9:  ld      a,($f0b6)
        ld      l,a
        ld      a,l
        add     a,a
        ld      a,l
        rra     
        ld      l,a
        ld      a,l
        ld      ($f49d),a
l2fe6:  ld      a,($f49d)
        cp      $20
        jp      p,l2f9e
        ld      hl,$f4a2
        push    hl
        ld      a,($f49d)
        ld      c,a
        add     a,a
        sbc     a,a
        ld      b,a
        ld      l,c
        ld      h,b
        add     hl,hl
        add     hl,hl
        ld      bc,$033d
        add     hl,bc
        push    hl
        rst     $18
        pop     hl
        ld      de,$f935
        rst     $38
        ld      hl,$f935
        push    hl
        ld      hl,$f498
        push    hl
        call    lba8d
        pop     hl
        ld      a,(hl)
        inc     hl
        or      (hl)
        inc     hl
        or      (hl)
        inc     hl
        or      (hl)
        jp      nz,l3065
        ld      hl,$f121
        push    hl
        ld      hl,$f49e
        push    hl
        ld      hl,$f498
        ld      de,$f935
        rst     $38
        ld      hl,$f935
        push    hl
        ld      hl,$f4a2
        push    hl
        call    lbdd4
        rst     $18
        call    lbab0
        jp      c,l2f9e
        ld      hl,$f19c
        push    hl
        ld      hl,$f49e
        push    hl
        rst     $18
        pop     af
        ld      hl,$f198
        push    hl
        ld      hl,$f0d4
        push    hl
        rst     $18
        pop     af
        ld      l,$03
        call    l8b1d
        ld      (ix-$08),c
        ld      a,(ix-$08)
        cp      $02
        jr      nz,l3070                ; (+$0e)
        jp      l30ea
l3065:  ld      a,($f49d)
        add     a,$01
        ld      ($f49d),a
        jp      l2fe6
l3070:  ld      a,(ix-$07)
        or      (ix-$08)
        ld      (ix-$07),a
        ld      hl,$f19c
        push    hl
        ld      hl,$f498
        push    hl
        rst     $18
        pop     af
        ld      l,$05
        call    l8b1d
        ld      (ix-$08),c
        ld      a,(ix-$08)
        cp      $02
        jr      z,l30ea                 ; (+$58)
        ld      a,(ix-$07)
        or      (ix-$08)
        ld      (ix-$07),a
        ld      hl,$f198
        ld      a,(hl)
        inc     hl
        or      (hl)
        inc     hl
        or      (hl)
        inc     hl
        or      (hl)
        jr      z,l3065                 ; (-$42)
        ld      hl,l3104
        push    hl
        ld      hl,$316f
        call    lb184
        ld      (ix-$08),c
        ld      a,(ix-$08)
        cp      $02
        jr      z,l30ea                 ; (+$2f)
        ld      a,(ix-$07)
        or      (ix-$08)
        ld      (ix-$07),a
        ld      hl,$f19c
        push    hl
        ld      hl,$f498
        push    hl
        rst     $18
        pop     af
        sub     a
        ld      ($f198),a
        ld      ($f199),a
        ld      ($f19a),a
        ld      ($f19b),a
        ld      l,$03
        call    l8b1d
        ld      (ix-$08),c
        ld      a,(ix-$08)
        cp      $02
        jr      nz,l30ef                ; (+$05)
l30ea:  ld      c,$02
        jp      lbe72
l30ef:  ld      a,(ix-$07)
        or      (ix-$08)
        ld      (ix-$07),a
        jp      l3065
        ld      d,d
        ld      b,c
        ld      c,l
        jr      nz,l3144                ; (+$44)
        ld      b,e
        ld      b,h
        jr      nz,l3104                ; (+$00)
l3104:  rst     $20
        ld      a,(ix+$04)
        or      a
        jp      z,l3150
        ld      l,$71
        rst     $08
        ld      l,$58
        rst     $08
        ld      hl,$30fb
        rst     $28
        ld      a,$67
        ld      ($f49c),a
        ld      l,a
        rst     $10
        ld      l,$63
        rst     $10
        ld      l,$76
        rst     $10
        ld      l,$04
        push    hl
        ld      l,$10
        push    hl
        ld      hl,$f19c
        call    l7fc5
        ld      l,$63
        rst     $10
        ld      l,$6a
        rst     $10
        ld      a,($f49d)
        ld      ($f0c7),a
        ld      l,$01
        push    hl
        ld      l,$0a
        push    hl
        ld      hl,$f0c5
l3144:  call    l7fc5
        ld      l,$7d
        rst     $10
        ld      l,$72
        rst     $08
        call    lb8d0
l3150:  ld      a,(ix+$04)
        or      a
        jr      z,l315a                 ; (+$04)
        ld      c,$0a
        jr      l315c                   ; (+$02)
l315a:  ld      c,$10
l315c:  ld      l,c
        call    l767c
        ld      a,c
        or      a
        jr      z,l3150                 ; (-$14)
        ld      l,$7f
        push    hl
        ld      l,$ff
        call    l7f65
        jp      lbe84
        rst     $30
        push    af
        push    af
        push    af
        push    af
        ld      (ix-$07),$00
        ld      hl,$f19c
        push    hl
        ld      hl,$f498
        push    hl
        rst     $18
        pop     af
        sub     a
        ld      ($f198),a
        ld      ($f199),a
        ld      ($f19a),a
        ld      ($f19b),a
        ld      l,$03
        call    l8b1d
        ld      (ix-$08),c
        ld      a,(ix-$08)
        cp      $02
        jp      z,l31ed
        ld      a,(ix-$07)
        or      (ix-$08)
        ld      (ix-$07),a
        ld      hl,$f19c
        push    hl
        ld      hl,$f49e
        push    hl
        rst     $18
        pop     af
        ld      hl,$f198
        push    hl
        ld      hl,$f0d4
        push    hl
        rst     $18
        pop     af
        ld      l,$03
        call    l8b1d
        ld      (ix-$08),c
        ld      a,(ix-$08)
        cp      $02
        jr      z,l31ed                 ; (+$22)
        ld      a,(ix-$07)
        or      (ix-$08)
        ld      (ix-$07),a
        ld      hl,$f19c
        push    hl
        ld      hl,$f498
        push    hl
        rst     $18
        pop     af
        ld      l,$05
        call    l8b1d
        ld      (ix-$08),c
        ld      a,(ix-$08)
        cp      $02
        jr      nz,l31f2                ; (+$05)
l31ed:  ld      c,$02
        jp      lbe72
l31f2:  ld      a,(ix-$07)
        or      (ix-$08)
        ld      (ix-$07),a
        ld      hl,$f198
        ld      a,(hl)
        inc     hl
        or      (hl)
        inc     hl
        or      (hl)
        inc     hl
        or      (hl)
        jr      z,l3227                 ; (+$20)
        ld      a,(ix-$07)
        or      $01
        ld      (ix-$07),a
        ld      a,($f49c)
        cp      $67
        jr      z,l323d                 ; (+$27)
        call    lb8d0
        ld      a,$67
        ld      ($f49c),a
        ld      l,a
        push    hl
        ld      l,$0a
        call    l7f65
        jr      l323d                   ; (+$16)
l3227:  ld      a,($f49c)
        cp      $6b
        jr      z,l323d                 ; (+$0f)
        call    lb8d0
        ld      a,$6b
        ld      ($f49c),a
        ld      l,a
        push    hl
        ld      l,$0a
        call    l7f65
l323d:  ld      c,(ix-$07)
        jp      lbe72
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        xor     d
        xor     d
        xor     d
        xor     d
        call    z,lcccc
        call    z,lf0f0
        ret     p

        ret     p

        nop     
        rst     $38
        nop     
        rst     $38
        rst     $38
        rst     $38
        nop     
        nop     
        nop     
        nop     
        nop     
        nop     
l325f:  rst     $30
        push    af
        push    af
        push    af
        push    af
        ld      (ix-$07),$00
        sub     a
        ld      ($f4b2),a
        ld      ($f4b3),a
        ld      a,$01
        ld      ($f4bc),a
        ld      hl,$f4bf
        push    hl
        ld      hl,$f121
        ld      de,$f935
        rst     $38
        ld      hl,$f935
        push    hl
        ld      hl,$f139
        push    hl
        call    lbdf7
        rst     $18
        pop     af
        ld      hl,$f0d9
        ld      a,$10
        cp      (hl)
        jp      p,l329a
        ld      c,$06
        jp      l32d0
l329a:  ld      hl,$f0d9
        ld      a,$08
        cp      (hl)
        jp      p,l32a7
        ld      c,$05
        jr      l32d0                   ; (+$29)
l32a7:  ld      hl,$f0d9
        ld      a,$04
        cp      (hl)
        jp      p,l32b4
        ld      c,$04
        jr      l32d0                   ; (+$1c)
l32b4:  ld      hl,$f0d9
        ld      a,$02
        cp      (hl)
        jp      p,l32c1
        ld      c,$03
        jr      l32d0                   ; (+$0f)
l32c1:  ld      hl,$f0d9
        ld      a,$01
        cp      (hl)
        jp      p,l32ce
        ld      c,$02
        jr      l32d0                   ; (+$02)
l32ce:  ld      c,$01
l32d0:  ld      a,c
        ld      ($f4be),a
l32d4:  ld      hl,$f4b8
        push    hl
        ld      hl,$f139
        push    hl
        rst     $18
        pop     af
l32de:  ld      hl,($f4b2)
        ld      a,h
        or      l
        jr      z,l3301                 ; (+$1c)
        ld      hl,$f19c
        push    hl
        ld      hl,$f4b8
        push    hl
        rst     $18
        pop     af
        ld      l,$05
        call    l8b1d
        ld      (ix-$08),c
        ld      a,(ix-$08)
        cp      $02
        jr      nz,l3320                ; (+$22)
        jp      l33d5
l3301:  ld      hl,$f19c
        push    hl
        ld      hl,$f4b8
        push    hl
        rst     $18
        pop     af
        call    l3451
        ld      l,$03
        call    l8b1d
        ld      (ix-$08),c
        ld      a,(ix-$08)
        cp      $02
        jr      nz,l335f                ; (+$42)
        jp      l33d5
l3320:  ld      a,(ix-$07)
        or      (ix-$08)
        ld      (ix-$07),a
        call    l34ad
        ld      hl,$f4aa
        push    hl
        ld      hl,$f198
        push    hl
        rst     $18
        ld      hl,$f4ae
        push    hl
        call    lbad9
        jr      z,l3301                 ; (-$3d)
        ld      hl,l355d
        push    hl
        ld      hl,$3679
        call    lb184
        ld      (ix-$08),c
        ld      a,(ix-$08)
        cp      $02
        jp      z,l33d5
        ld      a,(ix-$07)
        or      (ix-$08)
        ld      (ix-$07),a
        jp      l3301
l335f:  ld      a,(ix-$07)
        or      (ix-$08)
        ld      (ix-$07),a
        ld      hl,$f4b8
        push    hl
        ld      hl,$f121
        push    hl
        call    lbad9
        jr      nz,l33a6                ; (+$31)
        ld      a,($f4be)
        ld      e,a
        add     a,a
        sbc     a,a
        ld      d,a
        ld      hl,$f4b2
        ld      a,e
        cp      (hl)
        jr      nz,l3386                ; (+$03)
        ld      a,d
        inc     hl
        cp      (hl)
l3386:  jr      nz,l33da                ; (+$52)
        ld      hl,$0006
        sub     a
        ld      ($f4bc),a
        ld      ($f4b2),hl
        ld      a,($f0b6)
        ld      ($f4a8),a
        add     a,a
        sbc     a,a
        ld      ($f4a9),a
        ld      ($f4a7),a
        ld      ($f4a6),a
        jp      l3443
l33a6:  ld      hl,$f4b8
        push    hl
        ld      a,($f0b6)
        ld      ($f937),a
        add     a,a
        sbc     a,a
        ld      ($f938),a
        ld      ($f936),a
        ld      ($f935),a
        ld      hl,$f935
        push    hl
        call    lba62
        pop     af
        ld      a,($f19e)
        or      a
        jp      nz,l32de
        ld      l,$01
        call    lb2ce
        ld      a,c
        cp      $02
        jp      nz,l32de
l33d5:  ld      c,$02
        jp      lbe72
l33da:  ld      a,($f4bc)
        cp      $01
        jr      nz,l33eb                ; (+$0a)
        ld      hl,($f4b2)
        inc     hl
        ld      ($f4b2),hl
        jp      l3443
l33eb:  ld      hl,$f4a6
        ld      de,$f935
        rst     $38
        ld      hl,$f935
        push    hl
        ld      a,($f0b6)
        ld      ($f93f),a
        add     a,a
        sbc     a,a
        ld      ($f940),a
        ld      ($f93e),a
        ld      ($f93d),a
        ld      hl,$f93d
        push    hl
        call    lbdf7
        ld      hl,$f4bf
        push    hl
        call    lbab0
        jr      c,l341d                 ; (+$06)
        ld      c,(ix-$07)
        jp      lbe72
l341d:  ld      hl,$f4b4
        push    hl
        ld      hl,$f4a6
        push    hl
        rst     $18
        pop     af
        ld      hl,$f4a6
        push    hl
        ld      a,$02
        ld      ($f937),a
        add     a,a
        sbc     a,a
        ld      ($f938),a
        ld      ($f936),a
        ld      ($f935),a
        ld      hl,$f935
        push    hl
        call    lbd3e
        pop     af
l3443:  ld      l,$01
        call    lb2ce
        ld      a,c
        cp      $02
        jp      nz,l32d4
        jp      l33d5
l3451:  rst     $30
        ld      hl,$f198
        push    hl
        ld      a,($f4b2)
        sub     $06
        ld      a,($f4b3)
        sbc     a,$00
        jp      p,l3469
        ld      bc,($f4b2)
        jr      l3492                   ; (+$29)
l3469:  ld      hl,$f19c
        ld      de,$f935
        rst     $38
        ld      hl,$f935
        push    hl
        ld      hl,$f4a6
        push    hl
        call    lba8d
        pop     hl
        ld      a,(hl)
        inc     hl
        or      (hl)
        inc     hl
        or      (hl)
        inc     hl
        or      (hl)
        jr      z,l3489                 ; (+$04)
        ld      c,$06
        jr      l348b                   ; (+$02)
l3489:  ld      c,$00
l348b:  ld      a,c
        ld      e,a
        add     a,a
        sbc     a,a
        ld      d,a
        ld      c,e
        ld      b,d
l3492:  ld      l,c
        ld      h,b
        add     hl,hl
        add     hl,hl
        ld      bc,$3243
        add     hl,bc
        ld      de,$f935
        rst     $38
        ld      hl,$f935
        push    hl
        ld      hl,$f0d4
        push    hl
        call    lba8d
        rst     $18
        jp      lbe72
l34ad:  rst     $30
        ld      hl,$f4ae
        push    hl
        ld      a,($f4b2)
        sub     $06
        ld      a,($f4b3)
        sbc     a,$00
        jp      p,l34cc
        ld      bc,($f4b2)
        ld      hl,$ffff
        add     hl,bc
        ld      c,l
        ld      b,h
        jp      l3519
l34cc:  ld      hl,$f4a6
        push    hl
        ld      a,($f0b6)
        ld      ($f937),a
        add     a,a
        sbc     a,a
        ld      ($f938),a
        ld      ($f936),a
        ld      ($f935),a
        ld      hl,$f935
        push    hl
        call    lbad9
        jr      nz,l34f0                ; (+$06)
        ld      a,($f4be)
        ld      c,a
        jr      l3512                   ; (+$22)
l34f0:  ld      hl,$f19c
        ld      de,$f935
        rst     $38
        ld      hl,$f935
        push    hl
        ld      hl,$f4b4
        push    hl
        call    lba8d
        pop     hl
        ld      a,(hl)
        inc     hl
        or      (hl)
        inc     hl
        or      (hl)
        inc     hl
        or      (hl)
        jr      z,l3510                 ; (+$04)
        ld      c,$06
        jr      l3512                   ; (+$02)
l3510:  ld      c,$00
l3512:  ld      a,c
        ld      e,a
        add     a,a
        sbc     a,a
        ld      d,a
        ld      c,e
        ld      b,d
l3519:  ld      l,c
        ld      h,b
        add     hl,hl
        add     hl,hl
        ld      bc,$3243
        add     hl,bc
        ld      de,$f935
        rst     $38
        ld      hl,$f935
        push    hl
        ld      hl,$f0d4
        push    hl
        call    lba8d
        rst     $18
        jp      lbe72
        ld      bc,$f41b
        dec     (hl)
        push    hl
        dec     (hl)
        ld      (bc),a
        nop     
        ld      bc,$3607
        ld      a,(bc)
        ld      (hl),$7f
        dec     (hl)
        jr      nz,l3593                ; (+$4e)
        ld      c,a
        ld      d,h
        jr      nz,l3549                ; (+$00)
l3549:  ld      b,h
        ld      b,c
        ld      d,h
        ld      b,c
        jr      nz,l35a6                ; (+$57)
        ld      b,c
        ld      d,e
        jr      nz,l3553                ; (+$00)
l3553:  ld      d,d
        ld      b,c
        ld      c,l
        jr      nz,l35a8                ; (+$50)
        ld      b,c
        ld      d,h
        ld      d,h
        jr      nz,l355d                ; (+$00)
l355d:  rst     $20
        ld      hl,$fff9
        add     hl,sp
        ld      sp,hl
        ld      (ix-$07),$00
        ld      a,(ix+$04)
        or      a
        jr      z,l3570                 ; (+$03)
        call    lb8d0
l3570:  ld      l,$71
        rst     $08
        ld      l,$58
        rst     $08
        ld      c,(ix-$07)
        ld      hl,$353a
        jp      lb8ed
        ld      hl,l3553
        rst     $28
        ld      a,(ix+$04)
        or      a
        jr      z,l3591                 ; (+$08)
        ld      a,$67
        ld      ($f4bd),a
        ld      c,a
        jr      l3595                   ; (+$04)
l3591:  ld      a,($f4bd)
        ld      c,a
l3595:  ld      l,c
        rst     $10
        ld      l,$63
        rst     $10
        ld      l,$76
        rst     $10
        ld      l,$60
        rst     $10
        ld      l,$04
        push    hl
        ld      l,$10
        push    hl
l35a6:  ld      hl,$f4b8
        call    l7fc5
        ld      a,(ix+$04)
        or      a
        jr      z,l35b6                 ; (+$04)
        ld      c,$7d
        jr      l35b8                   ; (+$02)
l35b6:  ld      c,$7f
l35b8:  ld      l,c
        rst     $10
        ld      l,$72
        rst     $08
        ld      l,$10
        call    lb11f
l35c2:  ld      a,(ix+$04)
        or      a
        jr      z,l35cc                 ; (+$04)
        ld      c,$12
        jr      l35ce                   ; (+$02)
l35cc:  ld      c,$13
l35ce:  ld      l,c
        call    l767c
        ld      a,c
        or      a
        jr      z,l35c2                 ; (-$14)
        ld      l,$10
        call    lb136
        ld      a,($f126)
        ld      c,a
        ld      hl,$3534
        jp      lb8ed
        ld      (ix-$07),$01
        ld      a,$7f
        ld      ($f126),a
        jp      l3570
        jp      l3570
        ld      l,$10
        call    lb136
        ld      l,$7f
        push    hl
        ld      l,$ff
        call    l7f65
        ld      bc,l0002
        jp      lbe84
        jp      l3570
        ld      hl,l3549
        rst     $28
        ld      l,$60
        rst     $10
        ld      a,($f0d8)
        add     a,a
        ld      l,a
        push    hl
        ld      l,$10
        push    hl
        ld      hl,$f4aa
        call    l7fc5
        call    l34ad
        ld      hl,$f4ae
        push    hl
        ld      hl,$f4aa
        push    hl
        call    lbad9
        jr      z,l3646                 ; (+$16)
        ld      hl,$3543
        rst     $28
        ld      l,$60
        rst     $10
        ld      a,($f0d8)
        add     a,a
        ld      l,a
        push    hl
        ld      l,$10
        push    hl
        ld      hl,$f4ae
        call    l7fc5
l3646:  ld      a,(ix+$04)
        or      a
        jr      z,l364f                 ; (+$03)
        ld      l,$7d
        rst     $10
l364f:  ld      l,$72
        rst     $08
l3652:  ld      a,(ix+$04)
        or      a
        jr      z,l365c                 ; (+$04)
        ld      c,$14
        jr      l365e                   ; (+$02)
l365c:  ld      c,$15
l365e:  ld      l,c
        call    l767c
        ld      a,c
        or      a
        jr      z,l3652                 ; (-$14)
        ld      a,($f126)
        cp      $1a
        jr      nz,l3672                ; (+$05)
        ld      a,$7f
        ld      ($f126),a
l3672:  ld      (ix-$07),$00
        jp      l3570
        rst     $30
        push    af
        push    af
        push    af
        push    af
        ld      (ix-$07),$00
        ld      hl,$f4c3
        push    hl
        ld      hl,$f4b8
        push    hl
        rst     $18
        pop     af
l368c:  ld      hl,$f19c
        push    hl
        ld      hl,$f4c3
        push    hl
        rst     $18
        pop     af
        call    l34ad
        ld      hl,$f198
        push    hl
        ld      hl,$f4ae
        push    hl
        rst     $18
        pop     af
        ld      l,$03
        call    l8b1d
        ld      (ix-$08),c
        ld      a,(ix-$08)
        cp      $02
        jp      z,l372f
        ld      a,(ix-$07)
        or      (ix-$08)
        ld      (ix-$07),a
        ld      hl,$f4c3
        push    hl
        ld      hl,$f121
        push    hl
        call    lbad9
        jr      nz,l3700                ; (+$37)
        ld      hl,$f4c3
        push    hl
        ld      hl,$f139
        push    hl
        rst     $18
        pop     af
l36d3:  ld      hl,$f4c3
        push    hl
        ld      hl,$f4b8
        push    hl
        call    lbab0
        jp      nc,l3734
        ld      hl,$f19c
        push    hl
        ld      hl,$f4c3
        push    hl
        rst     $18
        pop     af
        call    l3451
        ld      l,$03
        call    l8b1d
        ld      (ix-$08),c
        ld      a,(ix-$08)
        cp      $02
        jp      nz,l3772
        jr      l372f                   ; (+$2f)
l3700:  ld      hl,$f4c3
        push    hl
        ld      a,($f0b6)
        ld      ($f937),a
        add     a,a
        sbc     a,a
        ld      ($f938),a
        ld      ($f936),a
        ld      ($f935),a
        ld      hl,$f935
        push    hl
        call    lba62
        pop     af
        ld      a,($f19e)
        or      a
        jp      nz,l368c
        ld      l,$01
        call    lb2ce
        ld      a,c
        cp      $02
        jp      nz,l368c
l372f:  ld      c,$02
        jp      lbe72
l3734:  ld      hl,$f19c
        push    hl
        ld      hl,$f4b8
        push    hl
        rst     $18
        pop     af
        call    l34ad
        ld      l,$05
        call    l8b1d
        ld      (ix-$08),c
        ld      a,(ix-$08)
        cp      $02
        jr      nz,l378e                ; (+$3e)
        jr      l372f                   ; (-$23)
l3752:  ld      hl,$f4c3
        push    hl
        ld      a,($f0b6)
        ld      ($f937),a
        add     a,a
        sbc     a,a
        ld      ($f938),a
        ld      ($f936),a
        ld      ($f935),a
        ld      hl,$f935
        push    hl
        call    lba62
        pop     af
        jp      l36d3
l3772:  ld      a,(ix-$07)
        or      (ix-$08)
        ld      (ix-$07),a
        ld      a,($f19e)
        or      a
        jr      nz,l3752                ; (-$2f)
        ld      l,$01
        call    lb2ce
        ld      a,c
        cp      $02
        jr      nz,l3752                ; (-$39)
        jp      l372f
l378e:  ld      a,(ix-$07)
        or      (ix-$08)
        ld      (ix-$07),a
        ld      hl,$f4aa
        push    hl
        ld      hl,$f198
        push    hl
        rst     $18
        ld      hl,$f4ae
        push    hl
        call    lbad9
        jr      nz,l37c1                ; (+$18)
        ld      a,($f4bd)
        cp      $6b
        jr      z,l37df                 ; (+$2f)
        call    lb8d0
        ld      a,$6b
        ld      ($f4bd),a
        ld      l,a
        push    hl
        ld      l,$0b
        call    l7f65
        jr      l37df                   ; (+$1e)
l37c1:  ld      a,(ix-$07)
        or      $01
        ld      (ix-$07),a
        ld      a,($f4bd)
        cp      $67
        jr      z,l37df                 ; (+$0f)
        call    lb8d0
        ld      a,$67
        ld      ($f4bd),a
        ld      l,a
        push    hl
        ld      l,$0b
        call    l7f65
l37df:  ld      c,(ix-$07)
        jp      lbe72
        rst     $30
        ld      l,$58
        rst     $08
        ld      l,$44
        rst     $10
        ld      l,$5b
        rst     $08
        ld      l,$11
        call    l7395
        ld      a,c
        or      a
l37f6:  jr      nz,l3833                ; (+$3b)
        ld      a,($f127)
        ld      l,a
        rst     $10
        ld      l,$63
        rst     $10
        ld      l,$62
        rst     $10
        ld      hl,$043d
        push    hl
        ld      hl,$0441
        push    hl
        ld      l,$00
        push    hl
        ld      l,$10
        push    hl
        ld      a,($f127)
        ld      c,a
        add     a,a
        sbc     a,a
        ld      b,a
        ld      l,c
        ld      h,b
        add     hl,hl
        add     hl,hl
        ld      bc,$f160
        add     hl,bc
        call    l784c
        ld      a,c
        or      a
        jr      z,l3836                 ; (+$0f)
        ld      a,($f140)
        cp      $02
        jr      nz,l3836                ; (+$08)
        call    l9a22
        jr      l3836                   ; (+$03)
l3833:  call    lb8e6
l3836:  jp      lbe72
        dec     b
        inc     (hl)
        dec     (hl)
        ld      (hl),$32
        inc     sp
        call    z,l3638
        add     hl,sp
l3843:  daa     
        add     hl,sp
        inc     de
        add     hl,sp
        pop     af
        jr      c,l37f6                 ; (-$54)
        jr      c,l3843                 ; (-$09)
        ld      hl,$fff9
        add     hl,sp
        ld      sp,hl
        ld      a,($f127)
        ld      (ix-$07),a
        ld      l,$58
        rst     $08
        ld      l,(ix-$07)
        rst     $10
        ld      l,$7c
        rst     $10
        ld      l,$5b
        rst     $08
        ld      l,$11
        call    l7395
        ld      a,c
        or      a
        jr      nz,l3884                ; (+$17)
        ld      l,$5c
        rst     $08
        ld      a,($f127)
        ld      l,a
        rst     $10
        ld      l,$63
        rst     $10
        ld      a,($f140)
        cp      $02
        jr      nz,l388a                ; (+$0b)
        call    l9a22
        jr      l3887                   ; (+$03)
l3884:  call    lb8e6
l3887:  jp      lbe72
l388a:  ld      l,$62
        rst     $10
        ld      hl,$f33b
        push    hl
        ld      a,($f127)
        ld      c,a
        add     a,a
        sbc     a,a
        ld      b,a
        ld      l,c
        ld      h,b
        add     hl,hl
        add     hl,hl
        ld      bc,$f160
        add     hl,bc
        push    hl
        rst     $18
        pop     af
        ld      c,(ix-$07)
        ld      hl,$3839
        jp      lb8ed
        ld      hl,$f33b
        push    hl
        ld      a,$00
        add     a,a
        sbc     a,a
        ld      ($f935),a
        ld      ($f936),a
        ld      a,$00
        ld      ($f938),a
        ld      a,$01
        ld      ($f937),a
        ld      hl,$f935
        push    hl
        call    lba62
        pop     af
l38cc:  ld      a,($f127)
        ld      c,a
        add     a,a
        sbc     a,a
        ld      b,a
        ld      l,c
        ld      h,b
        add     hl,hl
        add     hl,hl
        ld      bc,$f160
        add     hl,bc
        push    hl
        ld      hl,$f33b
        push    hl
        rst     $18
        pop     af
        ld      l,$01
        push    hl
        ld      l,$10
        push    hl
        ld      hl,$f33b
        call    l7fc5
        jp      l3887
        ld      hl,$f33b
        push    hl
        ld      a,$00
        add     a,a
        sbc     a,a
        ld      ($f935),a
        ld      ($f936),a
        ld      a,$00
        ld      ($f938),a
        ld      a,$01
        ld      ($f937),a
        ld      hl,$f935
        push    hl
        call    lbdf7
        pop     af
        jr      l38cc                   ; (-$47)
        ld      hl,$f33b
        push    hl
        ld      de,$f935
        rst     $38
        ld      hl,$f935
        push    hl
        call    lbb03
        rst     $18
        pop     af
        jp      l38cc
        ld      hl,$f33b
        push    hl
        ld      hl,$0001
        push    hl
        call    lbcb2
        pop     af
        jp      l38cc
        ld      hl,$f33b
        push    hl
        ld      hl,$0001
        push    hl
        call    lbd0f
        pop     af
        jp      l38cc
        nop     
        nop     
        nop     
        nop     
        nop     
        nop     
        nop     
        ld      bc,$0402
        ex      af,af'
        djnz    l3972                   ; (+$20)
        ld      b,b
        add     a,b
        nop     
        nop     
        nop     
        nop     
        nop     
        nop     
        nop     
        nop     
        nop     
        nop     
        ld      bc,$0302
        inc     b
        dec     b
        ld      b,$00
        ld      bc,$0302
        inc     b
        dec     b
        ld      b,$07
        nop     
        ld      bc,$0702
        ex      af,af'
        inc     bc
l3972:  inc     b
        dec     b
        ld      b,$00
        nop     
        nop     
        nop     
        nop     
        nop     
        nop     
        nop     
        nop     
        nop     
        nop     
        nop     
        nop     
        nop     
        nop     
        ld      bc,$0101
        nop     
        nop     
        ld      bc,$0101
        ld      bc,$4553
        ld      d,h
        dec     l
        nop     
        rst     $30
        ld      hl,$fff7
        add     hl,sp
        ld      sp,hl
        ld      a,($f2e7)
        ld      (ix-$08),a
l399e:  ld      l,$58
        rst     $08
        ld      hl,$398d
        rst     $28
        ld      hl,$3945
        ld      e,(ix-$08)
        sub     a
        ld      d,a
        add     hl,de
        ld      a,(hl)
        ld      (ix-$07),a
        ld      l,(ix-$07)
        ld      a,($f0da)
        cpl     
        ld      c,a
        and     l
        jr      z,l39c2                 ; (+$05)
        call    lb8e6
        jr      l39ee                   ; (+$2c)
l39c2:  ld      hl,$395d
        ld      e,(ix-$08)
        sub     a
        ld      d,a
        add     hl,de
        ld      a,(hl)
        ld      (ix-$09),a
        ld      hl,$3975
        ld      e,(ix-$08)
        sub     a
        ld      d,a
        add     hl,de
        ld      a,(hl)
        or      a
        jr      nz,l39e8                ; (+$0c)
        ld      l,(ix-$07)
        push    hl
        ld      l,(ix-$09)
        call    l3b21
        jr      l39ee                   ; (+$06)
l39e8:  ld      l,(ix-$09)
        call    l3c79
l39ee:  ld      l,$16
        call    l7395
        ld      a,c
        cp      $01
        jr      nz,l3a10                ; (+$18)
        ld      a,($f127)
        cp      $3d
        jr      nz,l3a03                ; (+$04)
        ld      c,$00
        jr      l3a06                   ; (+$03)
l3a03:  ld      c,(ix-$08)
l3a06:  ld      a,c
        ld      ($f2e7),a
        call    lb8e6
        jp      lbe72
l3a10:  ld      a,($f127)
        cp      $1b
        jr      nz,l3a2c                ; (+$15)
        ld      a,(ix-$08)
        cp      $17
        jr      nz,l3a22                ; (+$04)
        ld      c,$00
        jr      l3a26                   ; (+$04)
l3a22:  ld      c,(ix-$08)
        inc     c
l3a26:  ld      (ix-$08),c
        jp      l399e
l3a2c:  ld      a,(ix-$08)
        or      a
        jr      z,l3a3b                 ; (+$09)
        ld      c,(ix-$08)
        ld      a,c
        add     a,$ff
        ld      c,a
        jr      l3a3d                   ; (+$02)
l3a3b:  ld      c,$17
l3a3d:  ld      (ix-$08),c
        jp      l399e
        inc     d
        pop     af
        inc     d
        pop     af
        inc     d
        pop     af
        inc     d
        pop     af
        inc     d
        pop     af
        inc     d
        pop     af
        inc     d
        pop     af
        dec     d
        pop     af
        cp      (hl)
        ret     p

        add     a,b
        jr      nz,l3a68                ; (+$10)
        ex      af,af'
        inc     b
        ld      (bc),a
        ld      bc,$ffff
        ld      (bc),a
        dec     sp
        db      $ed, $3a                ; Undocumented 8 T-State NOP
        rst     $10
        ld      a,($3ac0)
        or      e
        ld      a,($3aa5)
        sub     a
        ld      a,($3a87)
        ld      (hl),b
        ld      a,($4542)
        ld      b,l
        ld      d,b
        jr      nz,l3ac5                ; (+$4f)
        ld      c,(hl)
        jr      nz,l3abe                ; (+$45)
        ld      d,d
        ld      d,d
        jr      nz,l3ad1                ; (+$54)
        ld      d,d
        ld      b,c
        ld      c,(hl)
        ld      d,e
        ld      c,c
        ld      d,h
        ld      c,c
        ld      c,a
        ld      c,(hl)
        nop     
        ld      b,l
        ld      e,b
        ld      b,l
        ld      d,d
        ld      b,e
        ld      c,c
        ld      d,e
        ld      b,l
        jr      nz,l3ad6                ; (+$45)
        ld      d,d
        ld      d,d
        ld      c,a
        ld      d,d
        ld      d,e
        nop     
        ld      d,h
        ld      d,d
        ld      b,c
        ld      d,b
        jr      nz,l3ae1                ; (+$44)
        ld      b,c
        ld      d,h
        ld      b,c
        jr      nz,l3ae7                ; (+$45)
        ld      d,d
        ld      d,d
        nop     
        ld      d,h
        ld      d,d
        ld      b,c
        ld      d,b
        jr      nz,l3aec                ; (+$41)
        ld      b,h
        ld      b,h
        ld      d,d
        jr      nz,l3af5                ; (+$45)
        ld      d,d
        ld      d,d
        nop     
        ld      d,h
        ld      d,d
        ld      b,c
        ld      d,b
        jr      nz,l3afc                ; (+$43)
        ld      d,h
        ld      c,h
        jr      nz,l3b02                ; (+$45)
        ld      d,d
l3abe:  ld      d,d
        nop     
        ld      d,h
        ld      d,d
        ld      b,c
        ld      d,b
        jr      nz,l3b07                ; (+$41)
        ld      b,e
        ld      d,h
        ld      c,c
        ld      d,(hl)
        ld      b,l
        jr      nz,l3b13                ; (+$46)
        ld      c,a
        ld      d,d
        ld      b,e
        ld      b,l
l3ad1:  jr      nz,l3b1f                ; (+$4c)
        ld      c,c
        ld      c,(hl)
        ld      b,l
l3ad6:  nop     
        ld      d,h
        ld      d,d
        ld      b,c
        ld      d,b
        jr      nz,l3b1e                ; (+$41)
        ld      b,e
        ld      d,h
        ld      c,c
        ld      d,(hl)
l3ae1:  ld      b,l
        jr      nz,l3b2d                ; (+$49)
        ld      c,(hl)
        ld      d,h
        ld      b,l
l3ae7:  ld      d,d
        ld      d,d
        ld      d,l
        ld      d,b
        ld      d,h
l3aec:  nop     
        ld      d,h
        ld      d,d
        ld      b,c
        ld      d,b
        jr      nz,l3b3c                ; (+$49)
        ld      c,h
        ld      c,h
l3af5:  ld      b,l
        ld      b,a
        ld      b,c
        ld      c,h
        jr      nz,l3b3c                ; (+$41)
        ld      b,h
l3afc:  ld      b,h
        ld      d,d
        ld      b,l
        ld      d,e
        ld      d,e
        nop     
l3b02:  ld      d,h
        ld      d,d
        ld      b,c
        ld      d,b
        jr      nz,l3b4a                ; (+$42)
        ld      b,c
        ld      b,h
        jr      nz,l3b5c                ; (+$50)
        ld      d,a
        ld      d,d
        jr      nz,l3b63                ; (+$53)
        ld      d,l
        ld      d,b
        ld      d,b
l3b13:  ld      c,h
        ld      e,c
        nop     
        ccf     
        jr      nz,l3b19                ; (+$00)
l3b19:  ld      b,l
        ld      c,(hl)
        ld      b,c
        ld      b,d
        ld      c,h
l3b1e:  ld      b,l
l3b1f:  jr      nz,l3b21                ; (+$00)
l3b21:  rst     $20
        ld      hl,$fff6
        add     hl,sp
        ld      sp,hl
        ld      l,$71
        rst     $08
        ld      a,(ix+$06)
l3b2d:  or      a
        jr      z,l3b57                 ; (+$27)
        ld      hl,l3b19
        rst     $28
        ld      c,(ix+$04)
        sub     a
        ld      b,a
        ld      l,c
        ld      h,b
        ld      e,l
l3b3c:  ld      d,h
        add     hl,hl
        add     hl,de
        add     hl,hl
        add     hl,de
        ld      bc,$f0db
        add     hl,bc
        rst     $28
        ld      hl,$f113
        ld      (ix-$08),l
        ld      (ix-$07),h
        ld      a,(ix+$06)
        ld      (ix-$09),a
        jr      l3b8a                   ; (+$33)
l3b57:  ld      c,(ix+$04)
        sub     a
        ld      b,a
l3b5c:  ld      l,c
        ld      h,b
        add     hl,hl
        ld      bc,$3a5e
        add     hl,bc
l3b63:  ld      a,(hl)
        inc     hl
        ld      h,(hl)
        ld      l,a
        rst     $28
        ld      c,(ix+$04)
        sub     a
        ld      b,a
        ld      l,c
        ld      h,b
        add     hl,hl
        ld      bc,$3a43
        add     hl,bc
        ld      a,(hl)
        ld      (ix-$08),a
        inc     hl
        ld      a,(hl)
        ld      (ix-$07),a
        ld      hl,$3a55
        ld      e,(ix+$04)
        sub     a
        ld      d,a
        add     hl,de
        ld      a,(hl)
        ld      (ix-$09),a
l3b8a:  ld      hl,$3b16
        rst     $28
        ld      l,(ix-$08)
        ld      h,(ix-$07)
        ld      a,(hl)
        ld      l,a
        and     (ix-$09)
        jr      z,l3b9f                 ; (+$04)
        ld      c,$56
        jr      l3ba1                   ; (+$02)
l3b9f:  ld      c,$57
l3ba1:  ld      l,c
        rst     $10
        ld      l,$72
        rst     $08
l3ba6:  ld      l,$06
        call    l7395
        ld      a,c
        cp      $01
        jr      z,l3bbe                 ; (+$0e)
        ld      a,($f127)
        cp      $1b
        jr      z,l3bbe                 ; (+$07)
        ld      a,($f127)
        cp      $1a
        jr      nz,l3bc4                ; (+$06)
l3bbe:  call    lb8e6
        jp      lbe8b
l3bc4:  ld      a,($f127)
        cp      $1c
        jr      nz,l3bcf                ; (+$04)
        ld      c,$56
        jr      l3bd1                   ; (+$02)
l3bcf:  ld      c,$57
l3bd1:  ld      (ix-$0a),c
        ld      l,(ix-$0a)
        push    hl
        ld      l,$ff
        call    l7f65
        ld      a,(ix-$0a)
        cp      $56
        jr      nz,l3bf1                ; (+$0d)
        ld      l,(ix-$08)
        ld      h,(ix-$07)
        ld      a,(hl)
        or      (ix-$09)
        ld      (hl),a
        jr      l3c00                   ; (+$0f)
l3bf1:  ld      l,(ix-$08)
        ld      h,(ix-$07)
        ld      c,(ix-$09)
        ld      a,c
        cpl     
        ld      c,a
        ld      a,(hl)
        and     c
        ld      (hl),a
l3c00:  ld      a,(ix+$06)
        or      a
        jp      z,l3ba6
        call    lb8dd
        ld      a,c
        cp      $02
        jp      nz,l3ba6
        jp      lbe8b
        pop     bc
        ret     p

        pop     hl
        jp      p,lf333
        jr      z,l3c0e                 ; (-$0d)
        scf     
        di      
        cp      d
        ret     p

        dec     (hl)
        pop     af
        djnz    l3c33                   ; (+$10)
        ld      a,(bc)
        djnz    l3c36                   ; (+$10)
        djnz    l3c32                   ; (+$0a)
        inc     b
        inc     b
        ld      bc,$0202
        ex      af,af'
        ld      bc,$ffff
        rst     $38
l3c32:  rst     $38
l3c33:  rst     $38
        rst     $38
        rst     $38
l3c36:  rst     $38
        nop     
        nop     
        ld      h,b
        jp      pe,l0000
        rst     $38
        nop     
        nop     
        nop     
        rst     $38
        nop     
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        nop     
        nop     
        rst     $38
        nop     
        nop     
        nop     
        nop     
        nop     
        nop     
        nop     
        nop     
        nop     
        nop     
        nop     
        nop     
        nop     
        nop     
        nop     
        nop     
        nop     
        nop     
        nop     
        nop     
        nop     
        nop     
        nop     
        nop     
        nop     
        nop     
        nop     
        ld      a,(bc)
        nop     
        dec     l
        ld      b,e
        ld      c,b
        ld      b,c
        ld      c,(hl)
        ld      b,a
        ld      b,l
        ccf     
        nop     
        dec     l
        ld      b,e
        ld      c,b
        ld      b,c
        ld      c,(hl)
        ld      b,a
        ld      b,l
        ccf     
        nop     
l3c79:  rst     $20
        ld      hl,$fff7
        add     hl,sp
        ld      sp,hl
        ld      c,(ix+$04)
        sub     a
        ld      b,a
        ld      l,c
        ld      h,b
        add     hl,hl
        ld      bc,$3c13
        add     hl,bc
        ld      a,(hl)
        ld      (ix-$08),a
        inc     hl
        ld      a,(hl)
        ld      (ix-$07),a
        ld      hl,$3c21
        ld      e,(ix+$04)
        sub     a
        ld      d,a
        add     hl,de
        ld      a,(hl)
        ld      (ix-$09),a
        ld      c,(ix+$04)
        sub     a
        ld      b,a
        ld      l,c
        ld      h,b
        add     hl,hl
        ld      bc,$0445
        add     hl,bc
        ld      a,(hl)
        inc     hl
        ld      h,(hl)
        ld      l,a
        rst     $28
        ld      l,$60
        rst     $10
        ld      hl,$3c28
        ld      e,(ix+$04)
        sub     a
        ld      d,a
        add     hl,de
        ld      l,(hl)
        push    hl
        ld      l,(ix-$09)
        push    hl
        ld      l,(ix-$08)
        ld      h,(ix-$07)
        call    l7fc5
        ld      hl,$3c70
        rst     $28
l3cd1:  ld      l,$06
        call    l7395
        ld      a,($f127)
        cp      $1c
        jr      nz,l3d16                ; (+$39)
        ld      l,$59
        rst     $08
        ld      l,$5a
        rst     $08
        ld      c,(ix+$04)
        sub     a
        ld      b,a
        ld      l,c
        ld      h,b
        add     hl,hl
        add     hl,hl
        ld      bc,$3c2f
        add     hl,bc
        push    hl
        ld      c,(ix+$04)
        sub     a
        ld      b,a
        ld      l,c
        ld      h,b
        add     hl,hl
        add     hl,hl
        ld      bc,$3c4b
        add     hl,bc
        push    hl
        ld      l,$04
        push    hl
        ld      l,(ix-$09)
        push    hl
        ld      l,(ix-$08)
        ld      h,(ix-$07)
        call    l784c
        ld      a,c
        or      a
        jr      nz,l3d24                ; (+$11)
        jp      lbe84
l3d16:  ld      a,($f127)
        cp      $1d
        jr      nz,l3d2e                ; (+$11)
        ld      a,$1b
        ld      ($f127),a
        jr      l3d2e                   ; (+$0a)
l3d24:  ld      l,$5a
        rst     $08
        ld      hl,$3c67
        rst     $28
        jp      l3cd1
l3d2e:  call    lb8e6
        jp      lbe84
        jr      nz,l3d63                ; (+$2d)
        jr      nz,l3d85                ; (+$4d)
        ld      b,c
        ld      e,c
        jr      nz,l3d8a                ; (+$4e)
        ld      b,l
        ld      b,l
        ld      b,h
        jr      nz,l3d93                ; (+$52)
        ld      b,l
        ld      d,e
        ld      b,l
        ld      d,h
        nop     
        rst     $30
        push    af
        push    af
        push    af
        push    af
        ld      l,$58
        rst     $08
        ld      l,$29
        rst     $10
        ld      l,$76
        rst     $10
        ld      hl,$043d
        push    hl
        ld      hl,$0441
        push    hl
        ld      l,$08
        push    hl
        ld      l,$10
        push    hl
        ld      hl,$f19c
        call    l784c
        ld      (ix-$07),c
        ld      a,(ix-$07)
        or      a
        jr      nz,l3d74                ; (+$03)
        jp      lbe72
l3d74:  ld      a,(ix-$07)
        cp      $02
        jr      nz,l3d98                ; (+$1d)
        ld      l,$59
        rst     $08
        ld      l,$5a
        rst     $08
        ld      l,$5a
        rst     $08
        ld      l,$1c
        rst     $10
        ld      a,($f140)
l3d8a:  cp      $02
        jr      z,l3d98                 ; (+$0a)
        ld      hl,$f19c
        push    hl
        ld      hl,$f2e1
        push    hl
        rst     $18
        pop     af
l3d98:  ld      a,($f140)
        cp      $02
        jr      nz,l3da4                ; (+$05)
        call    l9a22
        jr      l3dce                   ; (+$2a)
l3da4:  sub     a
        ld      ($f1a0),a
        ld      l,$01
        call    l8b1d
        ld      (ix-$08),c
        ld      a,(ix-$08)
        or      a
        jr      nz,l3dbc                ; (+$06)
        ld      hl,$3d34
        rst     $28
        jr      l3dc9                   ; (+$0d)
l3dbc:  ld      a,(ix-$08)
        cp      $01
        jr      nz,l3dc9                ; (+$06)
        ld      l,$63
        rst     $10
        ld      l,$69
        rst     $10
l3dc9:  ld      a,$01
        ld      ($f1a0),a
l3dce:  jp      lbe72
        nop     
        nop     
        rst     $38
        rst     $38
        nop     
        nop     
        ld      bc,$0300
        ld      de,$1213
        ld      ($753e),a
        ld      a,$6f
        ld      a,$2e
        ld      a,$04
        dec     de
        ld      a,(de)
        inc     e
        dec     e
        dec     hl
        ld      b,b
        jp      m,l4b41
        ld      b,b
        ld      l,$40
        ld      c,$40
        jr      nz,l3e49                ; (+$53)
        ld      c,c
        ld      b,a
        jr      nz,l3dfa                ; (+$00)
l3dfa:  jr      nz,l3e3e                ; (+$42)
        ld      d,h
        ld      d,e
        jr      nz,l3e00                ; (+$00)
l3e00:  jr      nz,l3e44                ; (+$42)
        ld      d,h
        ld      d,e
        jr      nz,l3e06                ; (+$00)
l3e06:  jr      nz,l3e5b                ; (+$53)
        ld      c,c
        ld      b,a
        jr      nz,l3e0c                ; (+$00)
l3e0c:  ld      c,c
        ld      c,(hl)
        ld      b,(hl)
        ld      c,a
        nop     
        ld      c,(hl)
        ld      c,a
        jr      nz,l3e15                ; (+$00)
l3e15:  rst     $30
        ld      hl,$fff5
        add     hl,sp
        ld      sp,hl
        sub     a
        ld      ($f1a0),a
        ld      a,($f127)
        ld      (ix-$0b),a
        ld      c,(ix-$0b)
        ld      hl,$3dd9
        jp      lb8ed
        ld      (ix-$09),$02
l3e32:  ld      hl,$ffff
        ld      ($f4c7),hl
        sub     a
        ld      ($f4cb),a
        ld      ($f4cc),a
l3e3f:  ld      a,($f13e)
        ld      e,a
        add     a,a
l3e44:  sbc     a,a
        ld      d,a
        ld      a,($f4cb)
l3e49:  sub     e
        ld      a,($f4cc)
        sbc     a,d
        jp      p,l3e84
        ld      hl,($f4cb)
        push    hl
        ld      hl,$0012
        push    hl
        call    lba2d
        pop     hl
        ld      bc,$e9b6
        add     hl,bc
        ld      a,(hl)
        cp      (ix-$09)
        jr      nz,l3e7b                ; (+$14)
        ld      hl,($f4cb)
        ld      ($f4c7),hl
        jr      l3e84                   ; (+$15)
        ld      (ix-$09),$03
        jr      l3e32                   ; (-$43)
        ld      (ix-$09),$01
        jr      l3e32                   ; (-$49)
l3e7b:  ld      hl,($f4cb)
        inc     hl
        ld      ($f4cb),hl
        jr      l3e3f                   ; (-$45)
l3e84:  ld      l,$10
        call    lb136
        ld      l,$71
        rst     $08
        ld      l,$58
        rst     $08
        ld      a,($f4c7)
        cp      $ff
        jr      nz,l3e9b                ; (+$05)
        ld      a,($f4c8)
        cp      $ff
l3e9b:  jr      nz,l3eb5                ; (+$18)
        ld      hl,$ffff
        ld      ($f4c9),hl
        ld      ($f4cd),hl
        ld      hl,$3e11
        rst     $28
        ld      l,(ix-$0b)
        rst     $10
        ld      hl,l3e0c
        rst     $28
        jp      l3f01
l3eb5:  ld      hl,($f4c7)
        push    hl
        ld      hl,$0012
        push    hl
        call    lba2d
        pop     hl
        ld      bc,$e9ae
        add     hl,bc
        ld      ($f4cf),hl
        ld      l,(ix-$0b)
        rst     $10
        ld      l,$76
        rst     $10
        ld      l,$04
        push    hl
        ld      l,$10
        push    hl
        ld      hl,($f4cf)
        call    l7fc5
        ld      hl,($f4cf)
        inc     hl
        inc     hl
        inc     hl
        inc     hl
        push    hl
        ld      hl,($f4cf)
        push    hl
        call    lbad9
        jr      z,l3f27                 ; (+$3b)
        ld      l,$77
        rst     $10
        ld      l,$04
        push    hl
        ld      l,$10
        push    hl
        ld      hl,($f4cf)
        inc     hl
        inc     hl
        inc     hl
        inc     hl
        call    l7fc5
        jr      l3f27                   ; (+$26)
l3f01:  ld      l,$72
        rst     $08
        ld      l,$06
        call    l7395
        ld      a,c
        cp      $01
        jp      nz,l4004
        call    lb8e6
l3f12:  ld      l,$10
        call    lb136
        ld      hl,l0000
        call    lb06a
        ld      a,$01
        ld      ($f1a0),a
        ld      c,$02
        jp      lbe72
l3f27:  ld      a,(ix-$09)
        cp      $03
        jr      nz,l3f57                ; (+$29)
        ld      hl,l3e06
        rst     $28
        ld      hl,($f4cf)
        ld      bc,$000e
        add     hl,bc
        sub     a
        ld      ($f4d1),a
        ld      ($f4d2),a
        ld      a,(hl)
        ld      ($f4d3),a
        inc     hl
        ld      a,(hl)
        ld      ($f4d4),a
        ld      l,$04
        push    hl
        ld      l,$10
        push    hl
        ld      hl,$f4d1
        call    l7fc5
        jr      l3f72                   ; (+$1b)
l3f57:  ld      a,(ix-$09)
        cp      $01
        jr      nz,l3f72                ; (+$14)
        ld      hl,l3e00
        rst     $28
        ld      l,$01
        push    hl
        ld      l,$10
        push    hl
        ld      hl,($f4cf)
        ld      bc,$000e
        add     hl,bc
        call    l7fc5
l3f72:  ld      hl,$ffff
        ld      ($f4cd),hl
        ld      hl,($f4c7)
        inc     hl
        ld      ($f4cb),hl
l3f7f:  ld      a,($f13e)
        ld      e,a
        add     a,a
        sbc     a,a
        ld      d,a
        ld      a,($f4cb)
        sub     e
        ld      a,($f4cc)
        sbc     a,d
        jp      p,l3fb2
        ld      hl,($f4cb)
        push    hl
        ld      hl,$0012
        push    hl
        call    lba2d
        pop     hl
        ld      bc,$e9b6
        add     hl,bc
        ld      a,(hl)
        cp      (ix-$09)
        jr      nz,l3fe8                ; (+$41)
        ld      hl,($f4cb)
        ld      ($f4cd),hl
        ld      l,$10
        call    lb11f
l3fb2:  ld      hl,$ffff
        ld      ($f4c9),hl
        ld      hl,($f4c7)
        ld      bc,$ffff
        add     hl,bc
        ld      ($f4cb),hl
l3fc2:  ld      a,($f4cc)
        or      a
        jp      m,l3f01
        ld      hl,($f4cb)
        push    hl
        ld      hl,$0012
        push    hl
        call    lba2d
        pop     hl
        ld      bc,$e9b6
        add     hl,bc
        ld      a,(hl)
        cp      (ix-$09)
        jr      nz,l3ff2                ; (+$13)
        ld      hl,($f4cb)
        ld      ($f4c9),hl
        jp      l3f01
l3fe8:  ld      hl,($f4cb)
        inc     hl
        ld      ($f4cb),hl
        jp      l3f7f
l3ff2:  ld      a,($f4cb)
        sub     $01
        ld      ($f4cb),a
        ld      a,($f4cc)
        sbc     a,$00
        ld      ($f4cc),a
        jr      l3fc2                   ; (-$42)
l4004:  ld      a,($f127)
        ld      c,a
        ld      hl,$3de5
        jp      lb8ed
        ld      a,($f4cd)
        cp      $ff
        jr      nz,l401a                ; (+$05)
        ld      a,($f4ce)
        cp      $ff
l401a:  jr      z,l4025                 ; (+$09)
        ld      hl,($f4cd)
        ld      ($f4c7),hl
        jp      l3e84
l4025:  call    l736f
        jp      l3e84
        jp      l3e84
        ld      a,($f4c9)
        cp      $ff
        jr      nz,l403a                ; (+$05)
        ld      a,($f4ca)
        cp      $ff
l403a:  jr      z,l4045                 ; (+$09)
        ld      hl,($f4c9)
        ld      ($f4c7),hl
        jp      l3e84
l4045:  call    l736f
        jp      l3e84
        ld      a,($f13e)
        cp      $64
        jp      p,l406b
        ld      l,$58
        rst     $08
        ld      l,(ix-$0b)
        rst     $10
        ld      l,$04
        call    la3cd
        ld      (ix-$08),c
        ld      a,(ix-$08)
        or      a
        jr      nz,l4071                ; (+$09)
        jp      l3f12
l406b:  call    l736f
        jp      l3e84
l4071:  ld      a,(ix-$08)
        cp      $02
        jr      nz,l407e                ; (+$06)
        call    l736f
        jp      l3e84
l407e:  ld      a,(ix-$09)
        cp      $01
        jr      nz,l40a9                ; (+$24)
        ld      hl,l3dfa
        rst     $28
        ld      hl,$043d
        push    hl
        ld      hl,$3dd5
        push    hl
        ld      l,$0c
        push    hl
        ld      l,$10
        push    hl
        ld      hl,$f343
        call    l784c
        ld      (ix-$08),c
        ld      a,(ix-$08)
        or      a
        jr      nz,l40d5                ; (+$2f)
        jp      l3f12
l40a9:  ld      a,(ix-$09)
        cp      $03
        jr      nz,l40ec                ; (+$3c)
        ld      hl,$3df4
        rst     $28
        ld      hl,$3dd1
        push    hl
        ld      hl,$0441
        push    hl
        ld      l,$0c
        push    hl
        ld      l,$10
        push    hl
        ld      hl,$f343
        call    l784c
        ld      (ix-$07),c
        ld      a,(ix-$07)
        or      a
        jp      nz,l413f
        jp      l3f12
l40d5:  ld      a,(ix-$08)
        cp      $02
        jr      nz,l40e2                ; (+$06)
        call    l736f
        jp      l3e84
l40e2:  ld      hl,$f4d1
        push    hl
        ld      hl,$f343
        push    hl
        rst     $18
        pop     af
l40ec:  ld      a,($f4c7)
        cp      $ff
        jr      nz,l40f8                ; (+$05)
        ld      a,($f4c8)
        cp      $ff
l40f8:  jp      z,l4194
        ld      hl,($f4c7)
        inc     hl
        ld      ($f4c7),hl
        push    hl
        ld      hl,$0012
        push    hl
        call    lba2d
        pop     hl
        ld      bc,$e9c0
        add     hl,bc
        push    hl
        ld      a,($f13e)
        ld      c,a
        add     a,a
        sbc     a,a
        ld      b,a
        push    bc
        ld      hl,$0012
        push    hl
        call    lba2d
        pop     hl
        ld      bc,$e9ae
        add     hl,bc
        ld      bc,$ffff
        add     hl,bc
        push    hl
        ld      hl,($f4c7)
        push    hl
        ld      hl,$0012
        push    hl
        call    lba2d
        pop     hl
        ld      bc,$e9ae
        add     hl,bc
        call    l9ad7
        jp      l419f
l413f:  ld      a,(ix-$07)
        cp      $02
        jr      nz,l4166                ; (+$20)
        ld      l,$78
        rst     $10
        call    la466
        ld      l,$00
        push    hl
        ld      hl,$f121
        push    hl
        ld      hl,$f139
        call    lacfa
        ld      (ix-$0a),c
        ld      a,(ix-$0a)
        cp      $02
        jr      nz,l4175                ; (+$12)
        jp      l3f12
l4166:  ld      hl,($f345)
        ld      ($f4d1),hl
        ld      hl,($f343)
        ld      ($f4d3),hl
        jp      l40ec
l4175:  ld      l,$5a
        rst     $08
        ld      l,$04
        push    hl
        ld      l,$10
        push    hl
        ld      hl,$f343
        call    l7fc5
        ld      a,(ix-$0a)
        or      a
        jr      nz,l418e                ; (+$04)
        ld      c,$66
        jr      l4190                   ; (+$02)
l418e:  ld      c,$69
l4190:  ld      l,c
        rst     $10
        jr      l4166                   ; (-$2e)
l4194:  ld      a,($f13e)
        ld      ($f4c7),a
        add     a,a
        sbc     a,a
        ld      ($f4c8),a
l419f:  ld      a,($f13e)
        add     a,$01
        ld      ($f13e),a
        ld      hl,($f4c7)
        push    hl
        ld      hl,$0012
        push    hl
        call    lba2d
        pop     hl
        ld      bc,$e9ae
        add     hl,bc
        ld      ($f4cf),hl
        push    hl
        ld      hl,$f139
        push    hl
        rst     $18
        pop     af
        ld      hl,($f4cf)
        inc     hl
        inc     hl
        inc     hl
        inc     hl
        push    hl
        ld      hl,$f121
        push    hl
        rst     $18
        pop     af
        ld      hl,($f4cf)
        ld      bc,l0008
        add     hl,bc
        ld      a,(ix-$09)
        ld      (hl),a
        ld      hl,($f4cf)
        ld      bc,$000a
        add     hl,bc
        sub     a
        ld      (hl),a
        inc     hl
        ld      (hl),a
        inc     hl
        ld      (hl),a
        inc     hl
        ld      (hl),a
        ld      hl,($f4cf)
        ld      bc,$000e
        add     hl,bc
        push    hl
        ld      hl,$f4d1
        push    hl
        rst     $18
        pop     af
        jp      l3e84
        ld      a,($f4c7)
        cp      $ff
        jr      nz,l4206                ; (+$05)
        ld      a,($f4c8)
        cp      $ff
l4206:  jr      z,l4235                 ; (+$2d)
        ld      hl,($f4c7)
        call    lb01b
        ld      a,($f4cd)
        cp      $ff
        jr      nz,l421a                ; (+$05)
        ld      a,($f4ce)
        cp      $ff
l421a:  jr      z,l423b                 ; (+$1f)
        ld      a,($f4cd)
        sub     $01
        ld      ($f4cd),a
        ld      a,($f4ce)
        sbc     a,$00
        ld      ($f4ce),a
        ld      hl,($f4cd)
        ld      ($f4c7),hl
        jp      l3e84
l4235:  call    l736f
        jp      l3e84
l423b:  ld      hl,($f4c9)
        ld      ($f4c7),hl
        jp      l3e84
        jr      nz,l4299                ; (+$53)
        ld      c,c
        ld      b,a
        jr      nz,l424a                ; (+$00)
l424a:  jr      nz,l428f                ; (+$43)
        ld      c,a
        ld      d,l
        ld      c,(hl)
        ld      d,h
        jr      nz,l4252                ; (+$00)
l4252:  ld      d,b
        ld      d,d
        ld      c,a
        ld      b,d
        ld      b,l
        dec     l
        ld      c,h
        ld      d,(hl)
        ld      c,h
        jr      nz,l425d                ; (+$00)
l425d:  rst     $30
        push    af
        push    af
        push    af
        push    af
        ld      l,$58
        rst     $08
        ld      a,($f140)
        cp      $02
        jr      nz,l4275                ; (+$09)
        ld      l,$39
        rst     $10
        call    l9a22
        jp      l43a3
l4275:  ld      l,$30
        push    hl
        ld      l,$c1
        call    lbe62
        ld      l,$19
        push    hl
        ld      l,$c0
        call    lbe62
        ld      l,$34
        push    hl
        ld      l,$c1
        call    lbe62
        ld      l,$c0
l428f:  call    lba5c
        ld      (ix-$08),c
        ld      l,$30
        push    hl
        ld      l,$c1
        call    lbe62
        ld      hl,$00f9
        push    hl
        ld      l,$c0
        call    lbe62
        ld      l,$34
        push    hl
        ld      l,$c1
        call    lbe62
        sub     a
        ld      ($f160),a
        ld      ($f161),a
        ld      ($f162),a
        ld      ($f163),a
        ld      a,($f331)
        cp      $03
        jr      nz,l42d4                ; (+$12)
        ld      l,$40
        call    lba5c
        ld      a,c
        ld      ($f163),a
        ld      l,$60
        call    lba5c
        ld      a,c
        ld      ($f160),a
l42d4:  ld      l,$00
        call    lba5c
        ld      a,c
        and     $7f
        ld      c,a
        ld      (ix-$07),c
        ld      a,(ix-$07)
        ld      ($f162),a
        ld      l,$34
        push    hl
        ld      l,$c3
        call    lbe62
        ld      a,($f15f)
        or      $10
        or      $08
        or      $01
        ld      l,a
        push    hl
        ld      l,$c0
        call    lbe62
        ld      l,$3c
        push    hl
        ld      l,$c3
        call    lbe62
        ld      l,$20
        call    lba5c
        ld      l,$71
        rst     $08
        ld      hl,l4252
        rst     $28
        sub     a
        ld      ($f161),a
        ld      l,(ix-$08)
        bit     6,l
        jr      z,l432b                 ; (+$0e)
        ld      hl,$00cc
        rst     $10
        ld      a,($f161)
        or      $04
        ld      ($f161),a
        jr      l432e                   ; (+$03)
l432b:  ld      l,$63
        rst     $10
l432e:  ld      l,(ix-$08)
        bit     5,l
        jr      z,l434a                 ; (+$15)
        ld      a,($f331)
        cp      $02
        jr      nz,l434a                ; (+$0e)
        ld      hl,$00d8
        rst     $10
        ld      a,($f161)
        or      $02
        ld      ($f161),a
        jr      l434d                   ; (+$03)
l434a:  ld      l,$63
        rst     $10
l434d:  ld      l,(ix-$08)
        ld      a,l
        and     $80
        ld      l,a
        jr      z,l4364                 ; (+$0e)
        ld      hl,$00c8
        rst     $10
        ld      a,($f161)
        or      $01
        ld      ($f161),a
        jr      l4367                   ; (+$03)
l4364:  ld      l,$63
        rst     $10
l4367:  ld      hl,l424a
        rst     $28
        ld      a,(ix-$07)
        ld      ($f0c7),a
        ld      l,$03
        push    hl
        ld      l,$0a
        push    hl
        ld      hl,$f0c5
        call    l7fc5
        ld      hl,$4244
        rst     $28
        sub     a
        ld      ($f33b),a
        ld      ($f33c),a
        ld      a,($f163)
        ld      ($f33d),a
        ld      a,($f160)
        ld      ($f33e),a
        ld      l,$04
        push    hl
        ld      l,$10
        push    hl
        ld      hl,$f33b
        call    l7fc5
        ld      l,$72
        rst     $08
l43a3:  jp      lbe72
        inc     bc
        ld      a,(bc)
        dec     c
        rrca    
        ld      d,c
        ld      b,h
        add     a,c
        ld      b,h
        ld      a,e
        ld      b,h
        ld      c,l
        ld      b,h
        ld      d,d
        ld      b,l
        ld      b,l
        dec     l
        ld      d,d
        ld      d,l
        ld      c,(hl)
        nop     
        ld      b,c
        ld      d,h
        ld      b,c
        nop     
        ld      b,h
        ld      b,h
        ld      d,d
        ld      b,l
        ld      d,e
        ld      d,e
        nop     
        rst     $30
        ld      hl,$fff9
        add     hl,sp
        ld      sp,hl
        ld      l,$58
        rst     $08
        ld      l,$3c
        rst     $10
        ld      l,$5b
        rst     $08
l43d4:  ld      l,$03
        call    l7395
        ld      a,c
        cp      $01
        jr      z,l4402                 ; (+$24)
        ld      a,($f127)
        cp      $1d
        jr      nz,l4408                ; (+$23)
        ld      a,($f140)
        cp      $02
        jr      nz,l4408                ; (+$1c)
        jr      l4402                   ; (+$14)
l43ee:  ld      l,$5c
        rst     $08
        ld      a,($f127)
        ld      l,a
        rst     $10
        ld      a,($f140)
        cp      $02
        jr      nz,l4423                ; (+$26)
        call    l9a22
        jr      l4442                   ; (+$40)
l4402:  call    lb8e6
        jp      lbe72
l4408:  ld      a,($f127)
        cp      $1d
        jr      z,l441d                 ; (+$0e)
        ld      a,($f127)
        cp      $1c
        jr      nz,l43ee                ; (-$28)
        ld      a,($f140)
        cp      $02
        jr      nz,l43ee                ; (-$2f)
l441d:  call    l736f
        jp      l43d4
l4423:  ld      a,($f127)
        cp      $1c
        jr      nz,l4438                ; (+$0e)
        ld      (ix-$07),$00
        ld      a,($f15e)
        ld      ($f127),a
        ld      l,a
        rst     $10
        jr      l4442                   ; (+$0a)
l4438:  ld      (ix-$07),$01
        ld      a,($f127)
        ld      ($f15e),a
l4442:  ld      a,($f127)
        ld      l,a
        ld      c,l
        ld      hl,$43a6
        jp      lb8ed
        ld      hl,$43be
        rst     $28
l4451:  ld      l,$63
        rst     $10
        ld      a,($f140)
        cp      $02
        jr      z,l4487                 ; (+$2c)
        ld      a,(ix-$07)
        or      a
        jr      z,l4487                 ; (+$26)
        ld      a,($f15e)
        cp      $0f
        jr      nz,l446c                ; (+$04)
        ld      c,$02
        jr      l446e                   ; (+$02)
l446c:  ld      c,$03
l446e:  ld      a,c
        ld      ($f331),a
        cp      $03
        jr      nz,l448a                ; (+$14)
        call    l9513
        jr      l448a                   ; (+$0f)
        ld      hl,$43ba
        rst     $28
        jr      l4451                   ; (-$30)
        ld      hl,$43b2
        rst     $28
        jr      l4451                   ; (-$36)
l4487:  jp      lbe72
l448a:  ld      a,($f331)
        ld      l,a
        call    l99ab
        ld      a,($f331)
        ld      l,a
        call    l99ab
        ld      l,$20
        call    lba5c
        ld      l,$66
        rst     $10
        jr      l4487                   ; (-$1b)
        ld      bc,$1400
        pop     af
        ld      bc,$0200
        nop     
        inc     de
        pop     af
        ld      bc,$0300
        nop     
        cp      (hl)
        ret     p

        ld      bc,$0400
        nop     
        dec     d
        pop     af
        ld      bc,$0500
        nop     
        pop     bc
l44bd:  ret     p

        inc     b
        nop     
        ld      b,$00
        pop     hl
        jp      p,l0004
        rlca    
        nop     
        jr      z,l44bd                 ; (-$0d)
        inc     b
        nop     
        ex      af,af'
        nop     
        scf     
        di      
        inc     b
        nop     
        add     hl,bc
        nop     
        dec     (hl)
        pop     af
        inc     b
        nop     
        ld      a,(bc)
        nop     
        inc     sp
        di      
        inc     b
        nop     
        dec     bc
        nop     
        cp      d
        ret     p

        inc     b
        nop     
        inc     c
        nop     
        ld      d,a
        pop     af
        rlca    
        nop     
        dec     c
        nop     
        jp      c,l01f0
        nop     
        ld      c,$00
        in      a,($f0)
        inc     e
        nop     
        rrca    
        nop     
        rst     $30
        ret     p

        inc     e
        nop     
        djnz    l44fe                   ; (+$00)
l44fe:  nop     
        ret     pe

        jr      nz,l4502                ; (+$00)
l4502:  ld      de,$2000
        ret     pe

        jr      nz,l4508                ; (+$00)
l4508:  ld      (de),a
        nop     
        ld      b,b
        ret     pe

        jr      nz,l450e                ; (+$00)
l450e:  inc     de
        nop     
        ld      h,b
        ret     pe

        jr      nz,l4514                ; (+$00)
l4514:  inc     d
        nop     
        add     a,b
        ret     pe

        jr      nz,l451a                ; (+$00)
l451a:  dec     d
        nop     
        and     b
        ret     pe

        jr      nz,l4520                ; (+$00)
l4520:  ld      d,$00
        ret     nz

        ret     pe

        jr      nz,l4526                ; (+$00)
l4526:  rla     
        nop     
        ret     po

        ret     pe

        jr      nz,l452c                ; (+$00)
l452c:  jr      l452e                   ; (+$00)
l452e:  push    de
        call    p,l0002
        ld      b,$10
        dec     a
        ld      hl,($1f2f)
        jr      nz,l4549                ; (+$0f)
        ld      b,(hl)
        add     hl,bc
        ld      b,(hl)
        inc     bc
        ld      b,(hl)
        ld      b,iyl
        rst     $30
        ld      b,l
        pop     af
        ld      b,l
        ex      de,hl
        ld      b,l
        dec     l
        jr      nz,l4598                ; (+$4e)
        ld      c,a
        ld      d,h
        jr      nz,l4594                ; (+$46)
        ld      c,a
        ld      d,l
        ld      c,(hl)
        ld      b,h
        nop     
        ld      c,h
        ld      c,c
        ld      d,e
        ld      d,h
        jr      nz,l45a9                ; (+$50)
        ld      d,d
        ld      c,a
        ld      b,a
        ld      d,d
        ld      b,c
        ld      c,l
        jr      nz,l4561                ; (+$00)
l4561:  ld      b,c
        ld      d,l
        ld      e,b
        jr      nz,l4593                ; (+$2d)
        jr      nz,l45bb                ; (+$53)
        ld      b,l
        ld      c,h
        ld      b,l
        ld      b,e
        ld      d,h
        jr      nz,l45b0                ; (+$41)
        ld      b,e
        ld      d,h
        ld      c,c
        ld      c,a
        ld      c,(hl)
        jr      nz,l4576                ; (+$00)
l4576:  ld      b,c
        ld      d,l
        ld      e,b
        jr      nz,l45c4                ; (+$49)
        ld      c,(hl)
        ld      d,h
        ld      b,l
        ld      d,d
        ld      b,(hl)
        ld      b,c
        ld      b,e
        ld      b,l
        jr      nz,l45d3                ; (+$4e)
        ld      c,a
        ld      d,h
        jr      nz,l45d9                ; (+$50)
        ld      d,d
        ld      b,l
        ld      d,e
        ld      b,l
        ld      c,(hl)
        ld      d,h
        nop     
        rst     $30
        ld      a,($f140)
l4594:  cp      $02
        jr      nz,l459d                ; (+$05)
l4598:  call    l134c
        jr      l45bc                   ; (+$1f)
l459d:  ld      a,($f140)
        cp      $03
        jr      nz,l45af                ; (+$0b)
        ld      a,($f0b8)
        or      a
        jr      z,l45bf                 ; (+$15)
        call    l134c
        jr      l45bc                   ; (+$0d)
l45af:  ld      l,$58
        rst     $08
        ld      a,($f0b8)
        or      a
        jr      nz,l45cc                ; (+$14)
        ld      hl,l4576
l45bb:  rst     $28
l45bc:  jp      lbe72
l45bf:  ld      hl,($f359)
        call    l9c0b
        ld      l,c
        ld      h,b
        ld      ($f359),hl
        jr      l45bc                   ; (-$10)
l45cc:  ld      hl,l4561
        rst     $28
        ld      l,$e1
        call    lba5c
l45d5:  ld      l,$5b
        rst     $08
        ld      l,$17
        call    l7395
        ld      l,$5c
        rst     $08
        ld      a,($f127)
        ld      l,a
        ld      c,l
        ld      hl,$4532
        jp      lb8ed
        call    l47ff
        jp      lbe72
        call    l4a83
        jp      lbe72
        call    l4c31
        jp      lbe72
        call    l46c0
        jp      lbe72
        call    l4ddf
        jp      lbe72
        call    l5206
        jp      lbe72
        ld      a,($f127)
        cp      $0a
        jp      m,l461e
        ld      a,($f127)
        cp      $1c
        jr      nz,l4652                ; (+$34)
l461e:  call    lb8e6
        ld      a,$63
        ld      ($f0c7),a
        ld      hl,$f347
        push    hl
        ld      hl,$f12c
        push    hl
        rst     $18
        pop     af
        ld      l,$58
        rst     $08
        ld      hl,$4553
        rst     $28
        ld      hl,$f0c5
        push    hl
        ld      hl,$0441
        push    hl
        ld      l,$00
        push    hl
        ld      l,$0a
        push    hl
        ld      hl,$f347
        call    l784c
        ld      a,c
        or      a
        jr      nz,l4667                ; (+$18)
        jp      lbe72
l4652:  ld      l,$00
        push    hl
        ld      a,($f127)
        ld      l,a
        call    l759c
        ld      a,c
        cp      $01
        jr      nz,l4691                ; (+$30)
        call    lb8e6
        jp      lbe72
l4667:  ld      a,($f349)
        ld      c,a
        add     a,a
        sbc     a,a
        ld      b,a
        ld      l,c
        ld      h,b
        add     hl,hl
        ld      bc,$f35f
        add     hl,bc
        ld      a,(hl)
        inc     hl
        or      (hl)
        jr      z,l468a                 ; (+$10)
        ld      hl,$00ad
        rst     $10
        ld      a,($f349)
        ld      l,a
        call    l4ca7
        ld      l,$4b
        rst     $10
        jr      l468e                   ; (+$04)
l468a:  ld      hl,$4547
        rst     $28
l468e:  jp      lbe72
l4691:  call    l736f
        jp      l45d5
        jp      l45d5
        jr      nz,l46bc                ; (+$20)
        jr      nz,l469e                ; (+$00)
l469e:  ld      d,b
        ld      d,d
        ld      c,a
        ld      b,a
        jr      nz,l46c4                ; (+$20)
        ld      d,e
        ld      c,c
        ld      e,d
        ld      b,l
        nop     
        ld      c,h
        ld      c,c
        ld      d,e
        ld      d,h
        jr      nz,l46ff                ; (+$50)
        ld      d,d
        ld      c,a
        ld      b,a
        ld      d,d
        ld      b,c
        ld      c,l
        jr      nz,l4705                ; (+$4e)
        ld      d,l
        ld      c,l
        ld      b,d
        ld      b,l
        ld      d,d
l46bc:  ld      d,e
        jr      nz,l46ec                ; (+$2d)
        nop     
l46c0:  rst     $30
        ld      hl,$fff6
l46c4:  add     hl,sp
        ld      sp,hl
        ld      l,$58
        rst     $08
        ld      a,($f34f)
        cp      $00
        jr      nz,l46d5                ; (+$05)
        ld      a,($f350)
        cp      $c0
l46d5:  jr      nz,l46dd                ; (+$06)
        ld      l,$7a
        rst     $10
        jp      l4784
l46dd:  ld      hl,$46a9
        rst     $28
        call    la5e1
        ld      hl,l469e
        call    l546e
        call    la5e1
        call    la5e1
        ld      (ix-$07),$00
l46f4:  ld      a,(ix-$07)
        cp      $64
        jp      nc,l4781
        ld      c,(ix-$07)
l46ff:  sub     a
        ld      b,a
        ld      l,c
        ld      h,b
        add     hl,hl
        ld      bc,$f35f
        add     hl,bc
        ld      a,(hl)
        ld      (ix-$0a),a
        inc     hl
        ld      a,(hl)
        ld      (ix-$09),a
        ld      a,(ix-$0a)
        or      (ix-$09)
        jp      z,l4787
        ld      l,(ix-$0a)
        ld      h,(ix-$09)
        ld      a,(hl)
        cp      $51
        jr      nz,l4729                ; (+$04)
        ld      c,$2a
        jr      l472b                   ; (+$02)
l4729:  ld      c,$20
l472b:  ld      l,c
        call    l54a0
        ld      a,(ix-$07)
        ld      ($f0c7),a
        ld      l,$02
        push    hl
        ld      l,$0a
        push    hl
        ld      hl,$f0c5
        call    laa31
        ld      hl,$469a
        call    l546e
        ld      l,(ix-$07)
        call    l9b31
        ld      a,c
        sub     (ix-$0a)
        ld      c,a
        ld      a,b
        sbc     a,(ix-$09)
        ld      b,a
        sub     a
        ld      ($f347),a
        ld      ($f348),a
        ld      a,c
        ld      ($f349),a
        ld      a,b
        ld      ($f34a),a
        ld      l,$01
        push    hl
        ld      l,$0a
        push    hl
        ld      hl,$f347
        call    laa31
        call    la5e1
        ld      l,$00
        call    l767c
        ld      a,c
        or      a
        jr      z,l4787                 ; (+$09)
        jp      lbe72
l4781:  ld      l,$4b
        rst     $10
l4784:  jp      lbe72
l4787:  inc     (ix-$07)
        jp      l46f4
        and     c
        ld      b,a
        sbc     a,d
        ld      b,a
        sub     e
        ld      b,a
        ld      c,c
        cpl     
        ld      c,a
        jr      nz,l47d8                ; (+$40)
        jr      nz,l479a                ; (+$00)
l479a:  ld      d,d
        ld      c,a
        ld      c,l
        jr      nz,l47df                ; (+$40)
        jr      nz,l47a1                ; (+$00)
l47a1:  ld      d,d
        ld      b,c
        ld      c,l
        jr      nz,l47e6                ; (+$40)
        jr      nz,l47a8                ; (+$00)
l47a8:  ld      (bc),a
        inc     bc
        ld      bc,$4220
        ld      c,c
        ld      d,h
        ld      d,e
        jr      nz,l47b2                ; (+$00)
l47b2:  jr      nz,l4807                ; (+$53)
        ld      c,c
        ld      b,a
        jr      nz,l47b8                ; (+$00)
l47b8:  ld      b,c
        ld      b,h
        ld      b,h
        ld      d,d
        ld      b,l
        ld      d,e
        ld      d,e
        jr      nz,l4814                ; (+$53)
        ld      d,b
        ld      b,c
        ld      b,e
        ld      b,l
        jr      nz,l4810                ; (+$49)
        ld      c,(hl)
        ld      b,(hl)
        ld      c,a
        ld      d,d
        ld      c,l
        ld      b,c
        ld      d,h
        ld      c,c
        ld      c,a
        ld      c,(hl)
        nop     
        ld      c,h
        ld      c,c
        ld      d,e
        ld      d,h
        jr      nz,l4819                ; (+$41)
l47d8:  ld      b,h
        ld      b,h
        ld      d,d
        jr      nz,l4830                ; (+$53)
        ld      d,b
        ld      b,c
l47df:  ld      b,e
        ld      b,l
        jr      nz,l482c                ; (+$49)
        ld      c,(hl)
        ld      b,(hl)
        ld      c,a
l47e6:  jr      nz,l4815                ; (+$2d)
        nop     
        ld      c,(hl)
        ld      c,a
        jr      nz,l482e                ; (+$41)
        ld      b,h
        ld      b,h
        ld      d,d
        ld      b,l
        ld      d,e
        ld      d,e
        jr      nz,l4848                ; (+$53)
        ld      d,b
        ld      b,c
        ld      b,e
        ld      b,l
        jr      nz,l4844                ; (+$49)
        ld      c,(hl)
        ld      b,(hl)
        ld      c,a
        nop     
l47ff:  rst     $30
        ld      hl,$ffee
        add     hl,sp
        ld      sp,hl
        ld      l,$58
l4807:  rst     $08
        ld      a,($f13e)
        or      a
        jr      nz,l4815                ; (+$07)
        ld      hl,$47e9
        rst     $28
        jp      l48ce
l4815:  ld      hl,$47d2
        rst     $28
l4819:  call    la5e1
        ld      hl,l47b8
        call    l546e
        call    la5e1
        call    la5e1
        ld      (ix-$08),$00
l482c:  ld      e,(ix-$08)
        sub     a
l4830:  ld      d,a
        ld      a,e
        sub     $03
        ld      a,d
        sbc     a,$00
        jp      p,l48cb
        ld      hl,l47a8
        ld      e,(ix-$08)
        sub     a
        ld      d,a
        add     hl,de
        ld      a,(hl)
l4844:  ld      (ix-$0d),a
        ld      (ix-$07),$00
        ld      (ix-$09),$00
        ld      hl,$e9ae
        ld      (ix-$0c),l
        ld      (ix-$0b),h
l4858:  ld      hl,$f13e
        ld      a,(ix-$09)
        cp      (hl)
        jp      nc,l48d7
        ld      l,(ix-$0c)
        ld      h,(ix-$0b)
        ld      bc,l0008
        add     hl,bc
        ld      a,(hl)
        cp      (ix-$0d)
        jp      nz,l48fc
        ld      (ix-$07),$01
        ld      c,(ix-$08)
        sub     a
        ld      b,a
        ld      l,c
        ld      h,b
        add     hl,hl
        ld      bc,$478d
        add     hl,bc
        ld      a,(hl)
        inc     hl
        ld      h,(hl)
        ld      l,a
        call    l546e
        ld      l,$04
        push    hl
        ld      l,$10
        push    hl
        ld      l,(ix-$0c)
        ld      h,(ix-$0b)
        call    laa31
        ld      l,(ix-$0c)
        ld      h,(ix-$0b)
        inc     hl
        inc     hl
        inc     hl
        inc     hl
        push    hl
        ld      l,(ix-$0c)
        ld      h,(ix-$0b)
        push    hl
        call    lbad9
        jp      z,l4908
        ld      l,$2d
        call    l54a0
        ld      l,$04
        push    hl
        ld      l,$10
        push    hl
        ld      l,(ix-$0c)
        ld      h,(ix-$0b)
        inc     hl
        inc     hl
        inc     hl
        inc     hl
        call    laa31
        jr      l4908                   ; (+$3d)
l48cb:  ld      l,$4b
        rst     $10
l48ce:  jp      lbe72
l48d1:  inc     (ix-$08)
        jp      l482c
l48d7:  ld      a,(ix-$07)
        or      a
        jr      z,l48d1                 ; (-$0c)
        call    la5e1
        jr      l48d1                   ; (-$11)
l48e2:  inc     (ix-$09)
        ld      l,(ix-$0c)
        ld      h,(ix-$0b)
        ld      a,l
        add     a,$12
        ld      l,a
        ld      a,h
        adc     a,$00
        ld      h,a
        ld      (ix-$0c),l
        ld      (ix-$0b),h
        jp      l4858
l48fc:  ld      l,$00
        call    l767c
        ld      a,c
        or      a
        jr      z,l48e2                 ; (-$23)
        jp      lbe72
l4908:  ld      a,(ix-$0d)
        cp      $03
        jr      nz,l493f                ; (+$30)
        ld      hl,l47b2
        call    l546e
        ld      l,(ix-$0c)
        ld      h,(ix-$0b)
        ld      bc,$000e
        add     hl,bc
        sub     a
        ld      (ix-$12),a
        ld      (ix-$11),a
        ld      a,(hl)
        ld      (ix-$10),a
        inc     hl
        ld      a,(hl)
        ld      (ix-$0f),a
        ld      l,$04
        push    hl
        ld      l,$10
        push    hl
        push    ix
        pop     bc
        ld      hl,$ffee
        add     hl,bc
        call    laa31
l493f:  ld      a,(ix-$0d)
        cp      $01
        jr      nz,l495f                ; (+$19)
        ld      hl,$47ab
        call    l546e
        ld      l,$02
        push    hl
        ld      l,$10
        push    hl
        ld      l,(ix-$0c)
        ld      h,(ix-$0b)
        ld      bc,$000e
        add     hl,bc
        call    laa31
l495f:  call    la5e1
        jp      l48fc
        add     a,b
        jr      nz,l4978                ; (+$10)
        ex      af,af'
        inc     b
        ld      (bc),a
        ld      bc,$f0c1
        pop     hl
        jp      p,lf333
        jr      z,l4967                 ; (-$0d)
        scf     
        di      
        cp      d
        ret     p

l4978:  dec     (hl)
        pop     af
        djnz    l498c                   ; (+$10)
        ld      a,(bc)
        djnz    l498f                   ; (+$10)
        djnz    l498b                   ; (+$0a)
        inc     b
        inc     b
        ld      bc,$0202
        ex      af,af'
        ld      bc,$49f0
        ret     po

l498b:  ld      c,c
l498c:  rst     $08
        ld      c,c
        cp      l
l498f:  ld      c,c
        xor     a
        ld      c,c
        and     c
        ld      c,c
        sub     (hl)
        ld      c,c
        ld      b,h
        ld      b,c
        ld      d,h
        ld      b,c
        jr      nz,l49e1                ; (+$45)
        ld      d,d
        ld      d,d
        ld      c,a
        ld      d,d
        nop     
        ld      b,c
        ld      b,h
        ld      b,h
        ld      d,d
        ld      b,l
        ld      d,e
        ld      d,e
        jr      nz,l49ef                ; (+$45)
        ld      d,d
        ld      d,d
        ld      c,a
        ld      d,d
        nop     
        ld      b,e
        ld      c,a
        ld      c,(hl)
        ld      d,h
        ld      d,d
        ld      c,a
        ld      c,h
        jr      nz,l49fd                ; (+$45)
        ld      d,d
        ld      d,d
        ld      c,a
        ld      d,d
        nop     
        ld      b,c
        ld      b,e
        ld      d,h
        ld      c,c
        ld      d,(hl)
        ld      b,l
        jr      nz,l4a0b                ; (+$46)
        ld      c,a
        ld      d,d
        ld      b,e
        ld      b,l
        jr      nz,l4a17                ; (+$4c)
        ld      c,c
        ld      c,(hl)
        ld      b,l
        nop     
        ld      b,c
        ld      b,e
        ld      d,h
        ld      c,c
        ld      d,(hl)
        ld      b,l
        jr      nz,l4a20                ; (+$49)
        ld      c,(hl)
        ld      d,h
        ld      b,l
        ld      d,d
        ld      d,d
        ld      d,l
        ld      d,b
        ld      d,h
        nop     
        ld      c,c
l49e1:  ld      c,h
        ld      c,h
        ld      b,l
        ld      b,a
        ld      b,c
        ld      c,h
        jr      nz,l4a2a                ; (+$41)
        ld      b,h
        ld      b,h
        ld      d,d
        ld      b,l
        ld      d,e
        ld      d,e
l49ef:  nop     
        ld      b,d
        ld      b,c
        ld      b,h
        jr      nz,l4a45                ; (+$50)
        ld      c,a
        ld      d,a
        ld      b,l
        ld      d,d
        jr      nz,l4a4e                ; (+$53)
        ld      d,l
        ld      d,b
l49fd:  ld      d,b
        ld      c,h
        ld      e,c
        nop     
        ld      c,(hl)
        ld      c,a
        nop     
        ld      e,c
        ld      b,l
        ld      d,e
        nop     
        ld      b,d
        ld      b,l
        ld      b,l
l4a0b:  ld      d,b
        jr      nz,l4a5d                ; (+$4f)
        ld      c,(hl)
        jr      nz,l4a56                ; (+$45)
        ld      d,d
        ld      d,d
        jr      nz,l4a69                ; (+$54)
        ld      d,d
        ld      b,c
l4a17:  ld      c,(hl)
        ld      d,e
        ld      c,c
        ld      d,h
        ld      c,c
        ld      c,a
        ld      c,(hl)
        dec     l
        nop     
l4a20:  ld      c,(hl)
        ld      c,a
        nop     
        ld      e,c
        ld      b,l
        ld      d,e
        nop     
        ld      b,l
        ld      e,b
        ld      b,l
l4a2a:  ld      d,d
        ld      b,e
        ld      c,c
        ld      d,e
        ld      b,l
        jr      nz,l4a76                ; (+$45)
        ld      d,d
        ld      d,d
        ld      c,a
        ld      d,d
        ld      d,e
        dec     l
        nop     
        dec     l
        ld      c,(hl)
        ld      c,a
        nop     
        dec     l
        ld      e,c
        ld      b,l
        ld      d,e
        nop     
        ld      d,h
        ld      d,d
        ld      b,c
        ld      d,b
l4a45:  jr      nz,l4a47                ; (+$00)
l4a47:  dec     l
        ld      c,(hl)
        ld      c,a
        nop     
        dec     l
        ld      e,c
        ld      b,l
l4a4e:  ld      d,e
        nop     
        ld      b,l
        ld      c,(hl)
        ld      b,c
        ld      b,d
        ld      c,h
        ld      b,l
l4a56:  jr      nz,l4a58                ; (+$00)
l4a58:  ld      d,b
        ld      c,a
        ld      b,h
        jr      nz,l4a8a                ; (+$2d)
l4a5d:  jr      nz,l4a5f                ; (+$00)
l4a5f:  ld      d,e
        ld      b,l
        ld      d,h
        ld      d,l
        ld      d,b
        jr      nz,l4aaf                ; (+$49)
        ld      c,(hl)
        ld      b,(hl)
        ld      c,a
l4a69:  ld      d,d
        ld      c,l
        ld      b,c
        ld      d,h
        ld      c,c
        ld      c,a
        ld      c,(hl)
        nop     
        ld      c,h
        ld      c,c
        ld      d,e
        ld      d,h
        jr      nz,l4aca                ; (+$53)
        ld      b,l
        ld      d,h
        ld      d,l
        ld      d,b
        jr      nz,l4ac6                ; (+$49)
        ld      c,(hl)
        ld      b,(hl)
        ld      c,a
        jr      nz,l4aaf                ; (+$2d)
        nop     
l4a83:  rst     $30
        push    af
        push    af
        push    af
        push    af
        ld      l,$58
l4a8a:  rst     $08
        ld      hl,$4a71
        rst     $28
        call    la5e1
        ld      hl,l4a5f
        call    l546e
        call    la5e1
        call    la5e1
        ld      hl,l4a58
        call    l546e
        ld      hl,$f157
        call    l546e
        call    la5e1
        ld      (ix-$07),$00
        ld      (ix-$08),$01
l4ab5:  ld      a,(ix-$07)
        cp      $08
        jp      nc,l4b07
        ld      a,($f0da)
        ld      l,a
        and     (ix-$08)
        jp      z,l4b63
        ld      hl,$4a50
l4aca:  call    l546e
        ld      c,(ix-$07)
        sub     a
        ld      b,a
        ld      l,c
        ld      h,b
        ld      e,l
        ld      d,h
        add     hl,hl
        add     hl,de
        add     hl,hl
        add     hl,de
        ld      bc,$f0db
        add     hl,bc
        call    l546e
        ld      a,($f113)
        ld      l,a
        and     (ix-$08)
        jr      z,l4aef                 ; (+$05)
        ld      bc,$4a4b
        jr      l4af2                   ; (+$03)
l4aef:  ld      bc,l4a47
l4af2:  ld      l,c
        ld      h,b
        call    l546e
        call    la5e1
        ld      l,$00
        call    l767c
        ld      a,c
        or      a
        jp      z,l4b63
        jp      lbe72
l4b07:  call    la5e1
        ld      (ix-$07),$00
l4b0e:  ld      e,(ix-$07)
        sub     a
        ld      d,a
        ld      a,e
        sub     $07
        ld      a,d
        sbc     a,$00
        jp      p,l4b70
        ld      hl,$4a41
        call    l546e
        ld      c,(ix-$07)
        sub     a
        ld      b,a
        ld      l,c
        ld      h,b
        add     hl,hl
        ld      bc,$4988
        add     hl,bc
        ld      a,(hl)
        inc     hl
        ld      h,(hl)
        ld      l,a
        call    l546e
        ld      hl,$4965
        ld      e,(ix-$07)
        sub     a
        ld      d,a
        add     hl,de
        ld      l,(hl)
        ld      a,($f114)
        ld      c,a
        and     l
        jr      z,l4b4b                 ; (+$05)
        ld      bc,$4a3c
        jr      l4b4e                   ; (+$03)
l4b4b:  ld      bc,$4a38
l4b4e:  ld      l,c
        ld      h,b
        call    l546e
        call    la5e1
        ld      l,$00
        call    l767c
        ld      a,c
        or      a
        jp      z,l4c0b
        jp      lbe72
l4b63:  inc     (ix-$07)
        ld      a,(ix-$08)
        add     a,a
        ld      (ix-$08),a
        jp      l4ab5
l4b70:  call    la5e1
        ld      hl,$4a27
        call    l546e
        ld      a,($f115)
        or      a
        jr      z,l4b84                 ; (+$05)
        ld      bc,$4a23
        jr      l4b87                   ; (+$03)
l4b84:  ld      bc,l4a20
l4b87:  ld      l,c
        ld      h,b
        call    l546e
        call    la5e1
        ld      hl,$4a08
        call    l546e
        ld      a,($f0be)
        or      a
        jr      z,l4ba0                 ; (+$05)
        ld      bc,$4a04
        jr      l4ba3                   ; (+$03)
l4ba0:  ld      bc,$4a01
l4ba3:  ld      l,c
        ld      h,b
        call    l546e
        call    la5e1
        call    la5e1
        ld      (ix-$07),$00
l4bb2:  ld      e,(ix-$07)
        sub     a
        ld      d,a
        ld      a,e
        sub     $07
        ld      a,d
        sbc     a,$00
        jp      p,l4c11
        ld      c,(ix-$07)
        sub     a
        ld      b,a
        ld      l,c
        ld      h,b
        add     hl,hl
        ld      bc,$0445
        add     hl,bc
        ld      a,(hl)
        inc     hl
        ld      h,(hl)
        ld      l,a
        call    l546e
        ld      hl,$4981
        ld      e,(ix-$07)
        sub     a
        ld      d,a
        add     hl,de
        ld      l,(hl)
        push    hl
        ld      hl,$497a
        ld      e,(ix-$07)
        sub     a
        ld      d,a
        add     hl,de
        ld      l,(hl)
        push    hl
        ld      c,(ix-$07)
        sub     a
        ld      b,a
        ld      l,c
        ld      h,b
        add     hl,hl
        ld      bc,$496c
        add     hl,bc
        ld      a,(hl)
        inc     hl
        ld      h,(hl)
        ld      l,a
        call    laa31
        call    la5e1
        ld      l,$00
        call    l767c
        ld      a,c
        or      a
        jr      z,l4c17                 ; (+$0f)
        jp      lbe72
l4c0b:  inc     (ix-$07)
        jp      l4b0e
l4c11:  ld      l,$4b
        rst     $10
        jp      lbe72
l4c17:  inc     (ix-$07)
        jp      l4bb2
        ld      c,h
        ld      c,c
        ld      d,e
        ld      d,h
        jr      nz,l4c64                ; (+$41)
        ld      c,h
        ld      c,h
        jr      nz,l4c77                ; (+$50)
        ld      d,d
        ld      c,a
        ld      b,a
        ld      d,d
        ld      b,c
        ld      c,l
        ld      d,e
        jr      nz,l4c5d                ; (+$2d)
        nop     
l4c31:  rst     $30
        ld      hl,$fff9
        add     hl,sp
        ld      sp,hl
        ld      l,$58
        rst     $08
        ld      a,($f34f)
        cp      $00
        jr      nz,l4c46                ; (+$05)
        ld      a,($f350)
        cp      $c0
l4c46:  jr      nz,l4c4d                ; (+$05)
        ld      l,$7a
        rst     $10
        jr      l4c78                   ; (+$2b)
l4c4d:  ld      hl,$4c1d
        rst     $28
        ld      (ix-$07),$00
l4c55:  ld      a,(ix-$07)
        cp      $64
        jr      nc,l4c75                ; (+$19)
        ld      c,(ix-$07)
        sub     a
        ld      b,a
        ld      l,c
        ld      h,b
        add     hl,hl
l4c64:  ld      bc,$f35f
        add     hl,bc
        ld      a,(hl)
        inc     hl
        or      (hl)
        jr      z,l4c80                 ; (+$13)
        ld      l,(ix-$07)
        call    l4ca7
        jr      l4c80                   ; (+$0b)
l4c75:  ld      l,$4b
l4c77:  rst     $10
l4c78:  jp      lbe72
l4c7b:  inc     (ix-$07)
        jr      l4c55                   ; (-$2b)
l4c80:  ld      l,$00
        call    l767c
        ld      a,c
        or      a
        jr      z,l4c7b                 ; (-$0e)
        jp      lbe72
        jr      nz,l4cae                ; (+$20)
        jr      nz,l4c90                ; (+$00)
l4c90:  ld      a,(l0020)
        jr      nz,l4cd7                ; (+$42)
        ld      e,c
        ld      d,h
        ld      b,l
        ld      d,e
        nop     
        jr      nz,l4cbc                ; (+$20)
        jr      nz,l4c9e                ; (+$00)
l4c9e:  ld      d,b
        ld      d,d
        ld      c,a
        ld      b,a
        ld      d,d
        ld      b,c
        ld      c,l
        jr      nz,l4ca7                ; (+$00)
l4ca7:  rst     $20
        push    af
        push    af
        push    af
        push    af
        call    la5e1
        ld      hl,l4c9e
        call    l546e
        ld      a,(ix+$04)
        ld      ($f0c7),a
        ld      l,$01
        push    hl
        ld      l,$0a
        push    hl
        ld      hl,$f0c5
        call    laa31
        ld      hl,$4c9a
        call    l546e
        ld      l,(ix+$04)
        call    l9b31
        push    bc
        ld      c,(ix+$04)
l4cd7:  sub     a
        ld      b,a
        ld      l,c
        ld      h,b
        add     hl,hl
        ld      bc,$f35f
        add     hl,bc
        pop     bc
        ld      a,c
        sub     (hl)
        ld      c,a
        ld      a,b
        inc     hl
        sbc     a,(hl)
        ld      b,a
        sub     a
        ld      ($f347),a
        ld      ($f348),a
        ld      a,c
        ld      ($f349),a
        ld      a,b
        ld      ($f34a),a
        ld      l,$01
        push    hl
        ld      l,$0a
        push    hl
        ld      hl,$f347
        call    laa31
        ld      hl,$4c93
        call    l546e
        call    la5e1
        call    la5e1
        ld      c,(ix+$04)
        sub     a
        ld      b,a
        ld      l,c
        ld      h,b
        add     hl,hl
        ld      bc,$f35f
        add     hl,bc
        ld      a,(hl)
        inc     hl
        ld      h,(hl)
        ld      l,a
        inc     hl
        ld      (ix-$08),l
        ld      (ix-$07),h
l4d26:  ld      l,(ix-$08)
        ld      h,(ix-$07)
        ld      a,(hl)
        cp      $50
        jr      z,l4d70                 ; (+$3f)
        ld      l,(ix-$08)
        ld      h,(ix-$07)
        ld      a,(hl)
        cp      $2b
        jp      nz,l4d85
        ld      l,(ix-$08)
        ld      h,(ix-$07)
        inc     hl
        ld      a,$09
        cp      (hl)
        jp      m,l4d57
        ld      l,(ix-$08)
        ld      h,(ix-$07)
        inc     hl
        ld      a,(hl)
        add     a,$30
        ld      c,a
        jr      l4d64                   ; (+$0d)
l4d57:  ld      l,(ix-$08)
        ld      h,(ix-$07)
        inc     hl
        ld      a,(hl)
        add     a,$41
        add     a,$f6
        ld      c,a
l4d64:  ld      l,c
        call    l54a0
        ld      hl,l4c90
        call    l546e
        jr      l4d8b                   ; (+$1b)
l4d70:  jp      lbe84
l4d73:  ld      l,(ix-$08)
        ld      h,(ix-$07)
        call    l9c0b
        ld      (ix-$08),c
        ld      (ix-$07),b
        jp      l4d26
l4d85:  ld      hl,$4c8c
        call    l546e
l4d8b:  ld      l,(ix-$08)
        ld      h,(ix-$07)
        call    l9c0b
        ld      a,c
        sub     (ix-$08)
        ld      c,a
        ld      a,b
        sbc     a,(ix-$07)
        ld      b,a
        push    bc
        ld      l,(ix-$08)
        ld      h,(ix-$07)
        call    l9e92
        ld      l,c
        ld      h,b
        call    l546e
        call    la5e1
        ld      l,$00
        call    l767c
        ld      a,c
        or      a
        jr      z,l4d73                 ; (-$46)
        jp      lbe84
        jr      nz,l4e03                ; (+$45)
        ld      d,d
        ld      d,d
        ld      c,a
        ld      d,d
        nop     
        ld      b,c
        ld      d,l
        ld      e,b
        dec     l
        ld      d,d
        ld      b,l
        ld      b,e
        ld      b,l
        ld      c,c
        ld      d,(hl)
        ld      c,c
        ld      c,(hl)
        ld      b,a
        jr      nz,l4dff                ; (+$2d)
        nop     
        ld      b,c
        ld      d,l
        ld      e,b
        dec     l
        ld      d,d
        ld      b,l
        ld      b,e
        ld      b,l
        ld      c,c
        ld      d,(hl)
        ld      b,l
        nop     
l4ddf:  rst     $30
        ld      hl,$fff0
        add     hl,sp
        ld      sp,hl
        ld      l,$58
        rst     $08
        ld      hl,$4dd3
        rst     $28
        ld      l,$48
        rst     $10
        ld      l,$05
        call    l7395
        ld      a,c
        cp      $01
        jr      nz,l4dff                ; (+$06)
        call    lb8e6
        jp      lbe72
l4dff:  ld      a,($f127)
        cp      $1d
        jr      nz,l4e12                ; (+$0c)
        ld      l,$5a
        rst     $08
        ld      l,$63
        rst     $10
        ld      l,$5e
        rst     $10
        jp      lbe72
l4e12:  ld      l,$58
        rst     $08
        ld      hl,$4dc3
        rst     $28
        ld      a,($f13e)
        ld      ($f2e6),a
        ld      hl,$f1a1
        push    hl
        ld      hl,$f429
        push    hl
        ld      hl,$f35f
        call    l9ad7
        sub     a
        ld      ($f13e),a
        ld      hl,$00c8
        push    hl
        ld      hl,$f35f
        call    lb8c3
        sub     a
        ld      ($f34f),a
        ld      a,$c0
        ld      ($f350),a
        ld      (ix-$0e),$19
        ld      (ix-$0a),$12
        call    la5e1
l4e4f:  push    ix
        pop     bc
        ld      hl,$fff9
        add     hl,bc
        call    l5184
        ld      a,c
        or      a
        jr      z,l4e72                 ; (+$15)
        ld      a,(ix-$07)
        cp      $3a
        jr      nz,l4e4f                ; (-$15)
        push    ix
        pop     bc
        ld      hl,$fff0
        add     hl,bc
        call    l50a2
        ld      a,c
        or      a
        jr      z,l4e7c                 ; (+$0a)
l4e72:  ld      hl,$4dbc
        rst     $28
        call    l04ab
        jp      lbe72
l4e7c:  ld      a,(ix-$10)
        or      a
        jr      nz,l4e91                ; (+$0f)
        ld      hl,($f34f)
        ld      ($f427),hl
        call    lb8dd
        ld      l,$4b
        rst     $10
        jp      lbe72
l4e91:  ld      a,$18
        cp      (ix-$10)
        jr      c,l4eb3                 ; (+$1b)
        ld      l,(ix-$10)
        ld      a,l
        add     a,a
        ld      e,a
        add     a,a
        add     a,e
        ld      l,a
        ld      c,l
        sub     a
        ld      b,a
        ld      l,c
        ld      h,b
        ld      bc,$449c
        add     hl,bc
        call    l4f51
        ld      a,c
        or      a
        jr      nz,l4ec4                ; (+$13)
        jr      l4e72                   ; (-$41)
l4eb3:  ld      a,(ix-$10)
        cp      $19
        jr      nz,l4ed5                ; (+$1b)
        ld      a,($f13e)
        cp      $64
        jr      c,l4eee                 ; (+$2d)
        jp      l4e72
l4ec4:  ld      a,(ix-$10)
        cp      $18
        jp      nz,l4e4f
        ld      hl,($f4d5)
        call    lbe71
        jp      lbe72
l4ed5:  ld      a,(ix-$10)
        cp      $1a
        jp      nz,l4e72
        push    ix
        pop     bc
        ld      hl,$fff1
        add     hl,bc
        call    l50a2
        ld      a,c
        or      a
        jr      z,l4f22                 ; (+$37)
        jp      l4e72
l4eee:  ld      a,($f13e)
        ld      l,a
        ld      a,($f13e)
        add     a,$01
        ld      ($f13e),a
        ld      c,l
        sub     a
        ld      b,a
        push    bc
        ld      hl,$0012
        push    hl
        call    lba2d
        pop     hl
l4f06:  ld      bc,$e9ae
        add     hl,bc
        ld      (ix-$0c),l
        ld      (ix-$0b),h
        push    ix
        pop     bc
        ld      hl,$fff2
        add     hl,bc
        call    l4f51
        ld      a,c
        or      a
        jp      nz,l4e4f
        jp      l4e72
l4f22:  push    ix
        pop     bc
        ld      hl,$fff9
        add     hl,bc
        call    l50a2
        ld      a,c
        or      a
        jp      nz,l4e72
        ld      l,(ix-$0f)
        ld      a,l
        add     a,$1a
        ld      l,a
        cp      (ix-$07)
        jr      z,l4f43                 ; (+$06)
        ld      l,$7b
        rst     $10
        jp      l4e72
l4f43:  ld      l,(ix-$0f)
        call    l4fec
        ld      a,c
        or      a
        jp      nz,l4e4f
        jp      l4e72
l4f51:  rst     $20
        ld      hl,$fff4
        add     hl,sp
        ld      sp,hl
        ld      l,(ix+$04)
        ld      h,(ix+$05)
        inc     hl
        inc     hl
        ld      a,(hl)
        ld      (ix-$0c),a
        inc     hl
        ld      a,(hl)
        ld      (ix-$0b),a
        ld      l,(ix+$04)
        ld      h,(ix+$05)
        ld      a,(hl)
        ld      (ix-$08),a
        ld      (ix-$09),$00
l4f76:  ld      l,(ix+$04)
        ld      h,(ix+$05)
        inc     hl
        inc     hl
        inc     hl
        inc     hl
        ld      a,(ix-$09)
        cp      (hl)
        jr      nc,l4f99                ; (+$13)
        push    ix
        pop     bc
        ld      hl,$fff9
        add     hl,bc
        call    l50a2
        ld      a,c
        or      a
        jr      z,l4fac                 ; (+$18)
        ld      c,$00
        jp      lbe84
l4f99:  push    ix
        pop     bc
        ld      hl,$fff9
        add     hl,bc
        call    l50a2
        ld      a,c
        or      a
        jr      z,l4fcd                 ; (+$26)
        ld      c,$00
        jp      lbe84
l4fac:  ld      a,(ix-$08)
        add     a,(ix-$07)
        ld      (ix-$08),a
        ld      l,(ix-$0c)
        ld      h,(ix-$0b)
        inc     (ix-$0c)
        jr      nz,l4fc3                ; (+$03)
        inc     (ix-$0b)
l4fc3:  ld      a,(ix-$07)
        ld      (hl),a
        inc     (ix-$09)
        jp      l4f76
l4fcd:  ld      a,(ix-$07)
        cp      (ix-$08)
        jr      z,l4fdd                 ; (+$08)
        ld      l,$7b
        rst     $10
        ld      c,$00
        jp      lbe84
l4fdd:  ld      c,$01
        jp      lbe84
        jr      nz,l5033                ; (+$4f)
        ld      d,(hl)
        ld      b,l
        ld      d,d
        ld      b,(hl)
        ld      c,h
        ld      c,a
        ld      d,a
        nop     
l4fec:  rst     $20
        ld      hl,$fff7
        add     hl,sp
        ld      sp,hl
        ld      c,(ix+$04)
        sub     a
        ld      b,a
        ld      l,c
        ld      h,b
        add     hl,hl
        ld      bc,$f35f
        add     hl,bc
        ld      a,($f34f)
        ld      (hl),a
        ld      a,($f350)
        inc     hl
        ld      (hl),a
l5007:  push    ix
        pop     bc
        ld      hl,$fff9
        add     hl,bc
        call    l5184
        ld      a,c
        or      a
        jr      nz,l501a                ; (+$05)
        ld      c,$00
        jp      lbe84
l501a:  ld      a,(ix-$07)
        cp      $3a
        jr      nz,l5007                ; (-$1a)
        ld      (ix-$08),$00
l5025:  push    ix
        pop     bc
        ld      hl,$fff9
        add     hl,bc
        call    l50a2
        ld      (ix-$09),c
        ld      a,(ix-$09)
        cp      $01
        jr      nz,l503e                ; (+$05)
        ld      c,$00
        jp      lbe84
l503e:  ld      a,(ix-$09)
        or      a
        jr      nz,l5059                ; (+$15)
        ld      hl,$f34f
        ld      a,$ff
        sub     (hl)
        ld      a,$e7
        inc     hl
        sbc     a,(hl)
        jr      nc,l506c                ; (+$1c)
        ld      hl,$4fe2
        rst     $28
        ld      c,$00
        jp      lbe84
l5059:  push    ix
        pop     bc
        ld      hl,$fff9
        add     hl,bc
        call    l50a2
        ld      a,c
        or      a
        jr      z,l5085                 ; (+$1e)
        ld      c,$00
        jp      lbe84
l506c:  ld      hl,($f34f)
        push    hl
        inc     hl
        ld      ($f34f),hl
        pop     hl
        ld      a,(ix-$07)
        ld      (hl),a
        ld      a,(ix-$08)
        add     a,(ix-$07)
        ld      (ix-$08),a
        jp      l5025
l5085:  ld      a,(ix-$08)
        cp      (ix-$07)
        jr      z,l5095                 ; (+$08)
        ld      l,$7b
        rst     $10
        ld      c,$00
        jp      lbe84
l5095:  ld      a,(ix-$09)
        cp      $03
        jp      nz,l5007
        ld      c,$01
        jp      lbe84
l50a2:  rst     $20
        push    af
        push    af
        push    af
        push    af
        push    ix
        pop     bc
        ld      hl,$fff9
        add     hl,bc
        call    l5184
        ld      a,c
        or      a
        jr      nz,l50ba                ; (+$05)
        ld      c,$01
        jp      lbe84
l50ba:  ld      a,(ix-$07)
        cp      $2a
        jr      nz,l50c6                ; (+$05)
        ld      c,$02
        jp      lbe84
l50c6:  ld      a,(ix-$07)
        cp      $24
        jr      nz,l50d2                ; (+$05)
        ld      c,$03
        jp      lbe84
l50d2:  ld      a,(ix-$07)
        cp      $30
        jr      c,l50ea                 ; (+$11)
        ld      a,$39
        cp      (ix-$07)
        jr      c,l50ea                 ; (+$0a)
        ld      a,(ix-$07)
        sub     $30
        ld      (ix-$07),a
        jr      l5100                   ; (+$16)
l50ea:  ld      a,(ix-$07)
        cp      $41
        jr      c,l5113                 ; (+$22)
        ld      a,$46
        cp      (ix-$07)
        jr      c,l5113                 ; (+$1b)
        ld      a,(ix-$07)
        sub     $37
        ld      (ix-$07),a
l5100:  push    ix
        pop     bc
        ld      hl,$fff8
        add     hl,bc
        call    l5184
        ld      a,c
        or      a
        jr      nz,l5118                ; (+$0a)
        ld      c,$01
        jp      lbe84
l5113:  ld      c,$01
        jp      lbe84
l5118:  ld      a,(ix-$08)
        cp      $30
        jr      c,l5130                 ; (+$11)
        ld      a,$39
        cp      (ix-$08)
        jr      c,l5130                 ; (+$0a)
        ld      a,(ix-$08)
        sub     $30
        ld      (ix-$08),a
        jr      l5146                   ; (+$16)
l5130:  ld      a,(ix-$08)
        cp      $41
        jr      c,l515e                 ; (+$27)
        ld      a,$46
        cp      (ix-$08)
        jr      c,l515e                 ; (+$20)
        ld      a,(ix-$08)
        sub     $37
        ld      (ix-$08),a
l5146:  ld      l,(ix+$04)
        ld      h,(ix+$05)
        ld      c,(ix-$07)
        ld      a,c
        add     a,a
        add     a,a
        add     a,a
        add     a,a
        or      (ix-$08)
        ld      c,a
        ld      (hl),c
        ld      c,$00
        jp      lbe84
l515e:  ld      c,$01
        jp      lbe84
        jr      nz,l51b4                ; (+$4f)
        ld      d,(hl)
        ld      b,l
        ld      d,d
        ld      d,d
        ld      d,l
        ld      c,(hl)
        nop     
        jr      nz,l51b4                ; (+$46)
        ld      d,d
        ld      b,c
        ld      c,l
        ld      c,c
        ld      c,(hl)
        ld      b,a
        nop     
        jr      nz,l51c7                ; (+$50)
        ld      b,c
        ld      d,d
        ld      c,c
        ld      d,h
        ld      e,c
        nop     
        jr      nz,l51c0                ; (+$41)
        ld      b,d
        ld      c,a
        ld      d,d
        ld      d,h
        nop     
l5184:  rst     $20
        ld      hl,$fff9
        add     hl,sp
        ld      sp,hl
l518a:  ld      l,$81
        call    lba5c
        bit     0,c
        jr      z,l519c                 ; (+$09)
        ld      hl,$517d
        rst     $28
        ld      c,$00
        jp      lbe84
l519c:  ld      l,$e2
        call    lba5c
        ld      (ix-$07),c
        ld      l,(ix-$07)
        bit     3,l
        jr      z,l518a                 ; (-$21)
        ld      l,(ix-$07)
        ld      a,l
        and     $07
        jr      z,l51c0                 ; (+$0d)
        ld      l,(ix-$07)
        bit     0,l
        jr      z,l51de                 ; (+$24)
        ld      hl,$5175
        rst     $28
        jr      l51ef                   ; (+$2f)
l51c0:  ld      l,(ix+$04)
        ld      h,(ix+$05)
        push    hl
l51c7:  ld      l,$e1
        call    lba5c
        ld      e,c
        sub     a
        ld      d,a
        ld      a,e
        and     $7f
        ld      e,a
        pop     hl
        ld      a,d
        and     $ff
        ld      d,a
        ld      (hl),e
        ld      c,$01
        jp      lbe84
l51de:  ld      l,(ix-$07)
        bit     1,l
        jr      z,l51eb                 ; (+$06)
        ld      hl,$516c
        rst     $28
        jr      l51ef                   ; (+$04)
l51eb:  ld      hl,$5163
        rst     $28
l51ef:  ld      c,$00
        jp      lbe84
        ld      a,($3030)
        nop     
        ld      b,c
        ld      d,l
        ld      e,b
        dec     l
        ld      d,e
        ld      b,l
        ld      c,(hl)
        ld      b,h
        ld      c,c
        ld      c,(hl)
        ld      b,a
        jr      nz,l5232                ; (+$2d)
        nop     
l5206:  rst     $30
        ld      hl,$fff3
        add     hl,sp
        ld      sp,hl
        ld      l,$58
        rst     $08
        ld      hl,$51f8
        rst     $28
        ld      (ix-$0d),$00
l5217:  ld      a,(ix-$0d)
        cp      $17
        jr      nc,l523e                ; (+$20)
        ld      c,(ix-$0d)
        sub     a
        ld      b,a
        ld      l,c
        ld      h,b
        ld      e,l
        ld      d,h
        add     hl,hl
        add     hl,de
        add     hl,hl
        ld      bc,$44a2
        add     hl,bc
        call    l53a3
        ld      l,$00
        call    l767c
        ld      a,c
        or      a
        jp      z,l5281
        jp      lbe72
l523e:  ld      (ix-$0c),$19
        ld      (ix-$0d),$00
l5246:  ld      hl,$f13e
        ld      a,(ix-$0d)
        cp      (hl)
        jr      nc,l5287                ; (+$38)
        ld      c,(ix-$0d)
        sub     a
        ld      b,a
        push    bc
        ld      hl,$0012
        push    hl
        call    lba2d
        pop     hl
        ld      bc,$e9ae
        add     hl,bc
        ld      (ix-$0a),l
        ld      (ix-$09),h
        ld      (ix-$08),$12
        push    ix
        pop     bc
        ld      hl,$fff4
        add     hl,bc
        call    l53a3
        ld      l,$00
        call    l767c
        ld      a,c
        or      a
        jr      z,l52b5                 ; (+$37)
        jp      lbe72
l5281:  inc     (ix-$0d)
        jp      l5217
l5287:  ld      (ix-$0d),$00
l528b:  ld      a,(ix-$0d)
        cp      $64
        jr      nc,l52bb                ; (+$29)
        ld      c,(ix-$0d)
        sub     a
        ld      b,a
        ld      l,c
        ld      h,b
        add     hl,hl
        ld      bc,$f35f
        add     hl,bc
        ld      a,(hl)
        inc     hl
        or      (hl)
        jr      z,l52ca                 ; (+$27)
        ld      l,(ix-$0d)
        call    l52d0
        ld      l,$00
        call    l767c
        ld      a,c
        or      a
        jr      z,l52ca                 ; (+$18)
        jp      lbe72
l52b5:  inc     (ix-$0d)
        jp      l5246
l52bb:  ld      hl,$51f4
        call    l546e
        call    la5e1
        ld      l,$4b
        rst     $10
        jp      lbe72
l52ca:  inc     (ix-$0d)
        jp      l528b
l52d0:  rst     $20
        ld      hl,$fff2
        add     hl,sp
        ld      sp,hl
        ld      l,$3a
        call    l54a0
        ld      l,$1a
        call    l5432
        ld      l,(ix+$04)
        call    l5432
        ld      l,(ix+$04)
        ld      a,l
        add     a,$1a
        ld      l,a
        call    l5432
        call    la5e1
        ld      a,($f137)
        add     a,$fa
        ld      l,a
        ld      (ix-$0c),l
        ld      l,$3a
        call    l54a0
        ld      (ix-$07),$00
        ld      (ix-$0b),$01
        ld      l,(ix+$04)
        call    l9b31
        ld      (ix-$0a),c
        ld      (ix-$09),b
        ld      c,(ix+$04)
        sub     a
        ld      b,a
        ld      l,c
        ld      h,b
        add     hl,hl
        ld      bc,$f35f
        add     hl,bc
        ld      a,(hl)
        ld      (ix-$0e),a
        inc     hl
        ld      a,(hl)
        ld      (ix-$0d),a
l532a:  ld      a,(ix-$0e)
        sub     (ix-$0a)
        ld      a,(ix-$0d)
        sbc     a,(ix-$09)
        jr      nc,l535d                ; (+$25)
        ld      a,(ix-$0b)
        cp      (ix-$0c)
        jr      c,l5378                 ; (+$38)
        ld      l,$2a
        call    l54a0
        ld      l,(ix-$07)
        call    l5432
        ld      (ix-$07),$00
        call    la5e1
        ld      l,$3a
        call    l54a0
        ld      (ix-$0b),$01
        jr      l5378                   ; (+$1b)
l535d:  ld      l,$24
        call    l54a0
        ld      l,(ix-$07)
        call    l5432
        call    la5e1
        jp      lbe84
l536e:  inc     (ix-$0e)
        jr      nz,l5376                ; (+$03)
        inc     (ix-$0d)
l5376:  jr      l532a                   ; (-$4e)
l5378:  ld      l,(ix-$0e)
        ld      h,(ix-$0d)
        ld      l,(hl)
        call    l5432
        ld      l,(ix-$0e)
        ld      h,(ix-$0d)
        ld      a,(ix-$07)
        add     a,(hl)
        ld      (ix-$07),a
        ld      a,(ix-$0b)
        add     a,$02
        ld      (ix-$0b),a
        ld      l,$00
        call    l767c
        ld      a,c
        or      a
        jr      z,l536e                 ; (-$32)
        jp      lbe84
l53a3:  rst     $20
        ld      hl,$fff5
        add     hl,sp
        ld      sp,hl
        ld      l,$3a
        call    l54a0
        ld      l,(ix+$04)
        ld      h,(ix+$05)
        ld      a,(hl)
        ld      (ix-$07),a
        ld      l,(ix-$07)
        call    l5432
        ld      (ix-$08),$00
        ld      l,(ix+$04)
        ld      h,(ix+$05)
        inc     hl
        inc     hl
        ld      a,(hl)
        ld      (ix-$0a),a
        inc     hl
        ld      a,(hl)
        ld      (ix-$09),a
l53d3:  ld      l,(ix+$04)
        ld      h,(ix+$05)
        inc     hl
        inc     hl
        inc     hl
        inc     hl
        ld      a,(ix-$08)
        cp      (hl)
        jr      nc,l5410                ; (+$2d)
        ld      l,(ix-$0a)
        ld      h,(ix-$09)
        inc     (ix-$0a)
        jr      nz,l53f1                ; (+$03)
        inc     (ix-$09)
l53f1:  ld      a,(hl)
        ld      (ix-$0b),a
        ld      l,(ix-$0b)
        call    l5432
        ld      a,(ix-$07)
        add     a,(ix-$0b)
        ld      (ix-$07),a
        ld      l,$00
        call    l767c
        ld      a,c
        or      a
        jr      z,l541c                 ; (+$0f)
        jp      lbe84
l5410:  ld      l,(ix-$07)
        call    l5432
        call    la5e1
        jp      lbe84
l541c:  inc     (ix-$08)
        jr      l53d3                   ; (-$4e)
        jr      nc,l5454                ; (+$31)
        ld      ($3433),a
        dec     (hl)
        ld      (hl),$37
        jr      c,l5464                 ; (+$39)
        ld      b,c
        ld      b,d
        ld      b,e
        ld      b,h
        ld      b,l
        ld      b,(hl)
        nop     
l5432:  rst     $20
        sub     a
        ld      ($f0b9),a
        ld      c,(ix+$04)
        sub     a
        ld      b,a
        push    bc
        ld      hl,l0004
        push    hl
        call    lb9de
        pop     hl
        ld      c,l
        ld      a,l
        and     $0f
        ld      l,a
        ld      c,l
        sub     a
        ld      b,a
        ld      l,c
        ld      h,b
        ld      bc,$5421
        add     hl,bc
        ld      l,(hl)
l5454:  call    l54a0
        ld      l,(ix+$04)
        ld      a,l
        and     $0f
        ld      l,a
        ld      c,l
        sub     a
        ld      b,a
        ld      l,c
        ld      h,b
        ld      bc,$5421
        add     hl,bc
        ld      l,(hl)
        call    l54a0
        jp      lbe84
l546e:  rst     $20
l546f:  ld      l,(ix+$04)
        ld      h,(ix+$05)
        ld      a,(hl)
        or      a
        jr      z,l5494                 ; (+$1b)
        ld      l,(ix+$04)
        ld      h,(ix+$05)
        inc     (ix+$04)
        jr      nz,l5487                ; (+$03)
        inc     (ix+$05)
l5487:  ld      l,(hl)
        call    l54a0
        ld      l,$00
        call    l767c
        ld      a,c
        or      a
        jr      z,l546f                 ; (-$25)
l5494:  jp      lbe84
        jr      nz,l54ec                ; (+$53)
        ld      d,h
        ld      b,c
        ld      c,h
        ld      c,h
        ld      b,l
        ld      b,h
        nop     
l54a0:  rst     $20
        ld      l,$e2
        call    lba5c
        bit     3,c
        jr      z,l54d2                 ; (+$28)
        ld      l,$e1
        call    lba5c
        ld      hl,$f32a
        ld      a,c
        cp      (hl)
        jr      nz,l54d2                ; (+$1c)
        ld      hl,$5497
        rst     $28
l54ba:  ld      l,$e2
        call    lba5c
        bit     3,c
        jr      z,l54e0                 ; (+$1d)
        ld      l,$e1
        call    lba5c
        ld      hl,$f339
        ld      a,c
        cp      (hl)
        jr      nz,l54e0                ; (+$11)
        ld      l,$5d
        rst     $08
l54d2:  ld      hl,$f137
        ld      a,($f0b9)
        cp      (hl)
        jr      c,l54ec                 ; (+$11)
        call    la5e1
        jr      l54ec                   ; (+$0c)
l54e0:  ld      l,$00
        call    l767c
        ld      a,c
        or      a
        jr      z,l54ba                 ; (-$2f)
        jp      lbe84
l54ec:  ld      a,($f0b9)
        add     a,$01
        ld      ($f0b9),a
l54f4:  ld      l,$e2
        call    lba5c
        bit     4,c
        jr      z,l54f4                 ; (-$09)
        ld      l,(ix+$04)
        push    hl
        ld      l,$e3
        call    lbe62
        jp      lbe84
        xor     d
        ld      d,l
        nop     
        nop     
        add     hl,bc
        ld      d,l
        ld      (bc),a
        nop     
        dec     bc
        ld      d,l
        ld      (bc),a
        nop     
        inc     d
        pop     af
        ld      bc,$1300
        pop     af
        ld      bc,$c100
        ret     p

        inc     b
        nop     
        pop     hl
        jp      p,l0004
        inc     sp
        di      
        inc     b
        nop     
        dec     d
        pop     af
        ld      bc,$2800
        di      
        inc     b
        nop     
        scf     
        di      
        inc     b
        nop     
        cp      (hl)
        ret     p

        ld      bc,$ba00
        ret     p

        inc     b
        nop     
        dec     (hl)
        pop     af
        inc     b
        nop     
        ld      e,a
        di      
        ret     z

        nop     
        ld      a,$f1
        ld      bc,$d700
        call    p,l0002
        ld      d,a
        pop     af
        rlca    
        nop     
        jp      c,l01f0
        nop     
        in      a,($f0)
        jr      c,l5559                 ; (+$00)
l5559:  nop     
        ret     pe

        nop     
        ld      bc,l0000
        nop     
        nop     
        ld      (bc),a
        dec     e
        inc     e
        ld      l,$56
        call    m,lf455
        ld      d,l
        rst     $30
        ld      hl,$fff6
        add     hl,sp
        ld      sp,hl
        ld      a,($f127)
        cp      $3b
        jr      nz,l5582                ; (+$0b)
        ld      (ix-$0a),$01
        ld      a,$f4
        ld      ($f4d9),a
        jr      l558b                   ; (+$09)
l5582:  ld      (ix-$0a),$00
        ld      a,$e4
        ld      ($f4d9),a
l558b:  ld      (ix-$07),$01
        ld      l,$71
        rst     $08
        ld      l,$58
        rst     $08
        ld      a,($f127)
        ld      l,a
        rst     $10
        ld      l,$7f
        rst     $10
        ld      l,$a1
        call    lba5c
        ld      (ix-$09),c
        ld      l,(ix-$09)
        bit     2,l
        jr      z,l55b2                 ; (+$06)
        ld      (ix-$08),$49
        jr      l55c3                   ; (+$11)
l55b2:  ld      a,(ix-$0a)
        or      a
        jr      z,l55da                 ; (+$22)
        ld      l,(ix-$09)
        bit     4,l
        jr      z,l55da                 ; (+$1b)
        ld      (ix-$08),$4a
l55c3:  ld      l,$72
        rst     $08
        ld      a,(ix-$07)
        cp      $02
        jp      z,l5638
        ld      l,(ix-$08)
        push    hl
        ld      l,$ff
        call    l7f65
        jp      l5638
l55da:  ld      l,$48
        push    hl
        ld      l,$ff
        call    l7f65
        ld      l,$72
        rst     $08
        ld      l,$05
        call    l7395
        ld      a,($f127)
        ld      c,a
        ld      hl,$5561
        jp      lb8ed
        ld      (ix-$08),$5e
        jr      l55c3                   ; (-$37)
        jr      l55c3                   ; (-$39)
        ld      l,$78
        push    hl
        ld      l,$ff
        call    l7f65
        ld      l,$a0
        call    lba5c
        ld      a,(ix-$0a)
        or      a
        jr      z,l5614                 ; (+$05)
        call    l563e
        jr      l5619                   ; (+$05)
l5614:  ld      l,$01
        call    l5738
l5619:  ld      (ix-$07),c
        ld      a,(ix-$07)
        or      a
        jr      nz,l5626                ; (+$04)
        ld      c,$66
        jr      l5628                   ; (+$02)
l5626:  ld      c,$69
l5628:  ld      (ix-$08),c
        jp      l55c3
        call    lb8e6
        ld      (ix-$07),$02
        jp      l55c3
l5638:  ld      c,(ix-$07)
        jp      lbe72
l563e:  rst     $30
        ld      hl,$fff9
        add     hl,sp
        ld      sp,hl
        call    lae1a
        ld      hl,($f34f)
        ld      bc,$4000
        add     hl,bc
        ld      ($f4d7),hl
        ld      l,$11
        call    l5a1c
        ld      (ix-$07),c
        ld      a,(ix-$07)
        or      a
        jp      nz,l5728
        ld      hl,$550d
        ld      ($f4de),hl
l5666:  ld      hl,($f4de)
        ld      a,(hl)
        inc     hl
        or      (hl)
        jr      z,l5680                 ; (+$12)
        ld      hl,($f4de)
        call    l5896
        ld      (ix-$07),c
        ld      a,(ix-$07)
        or      a
        jr      z,l56ab                 ; (+$2e)
        jp      l5728
l5680:  ld      hl,$e9ae
        ld      ($f4e0),hl
        ld      a,($f13e)
        ld      c,a
        add     a,a
        sbc     a,a
        ld      b,a
        push    bc
        ld      hl,$0012
        push    hl
        call    lba2d
        pop     hl
        ld      ($f4e2),hl
        ld      hl,$f4e0
        call    l5896
        ld      (ix-$07),c
        ld      a,(ix-$07)
        or      a
        jr      z,l56b8                 ; (+$10)
        jp      l5728
l56ab:  ld      hl,($f4de)
        inc     hl
        inc     hl
        inc     hl
        inc     hl
        ld      ($f4de),hl
        jp      l5666
l56b8:  sub     a
        ld      ($f4e0),a
        ld      a,$c0
        ld      ($f4e1),a
        ld      hl,($f4d7)
        ld      ($f4e2),hl
        ld      hl,$f4e0
        call    l5896
        ld      (ix-$07),c
        ld      a,(ix-$07)
        or      a
        jp      nz,l5728
        ld      hl,$f2e8
        ld      ($f4dc),hl
l56dd:  ld      hl,lf328
        ld      a,($f4dc)
        sub     l
        ld      a,($f4dd)
        sbc     a,h
        jr      nc,l56fe                ; (+$14)
        ld      hl,($f4dc)
        inc     hl
        inc     hl
        ld      l,(hl)
        call    l5905
        ld      (ix-$07),c
        ld      a,(ix-$07)
        or      a
        jr      z,l570e                 ; (+$12)
        jr      l5728                   ; (+$2a)
l56fe:  ld      l,$13
        call    l5a1c
        ld      (ix-$07),c
        ld      a,(ix-$07)
        or      a
        jr      z,l571a                 ; (+$0e)
        jr      l5728                   ; (+$1a)
l570e:  ld      hl,($f4dc)
        inc     hl
        inc     hl
        inc     hl
        inc     hl
        ld      ($f4dc),hl
        jr      l56dd                   ; (-$3d)
l571a:  ld      l,$00
        call    l5738
        ld      (ix-$07),c
        ld      a,(ix-$07)
        or      a
        jr      z,l5733                 ; (+$0b)
l5728:  ld      l,$13
        call    l5a1c
        ld      c,(ix-$07)
        jp      lbe72
l5733:  ld      c,$00
        jp      lbe72
l5738:  rst     $20
        ld      hl,$fff9
        add     hl,sp
        ld      sp,hl
        call    lae1a
        ld      a,($f13e)
        ld      ($f2e6),a
        ld      hl,$f1a1
        push    hl
        ld      hl,$f429
        push    hl
        ld      hl,$f35f
        call    l9ad7
        ld      l,$12
        call    l5a1c
        ld      (ix-$07),c
        ld      a,(ix-$07)
        or      a
        jp      nz,l5872
        ld      l,$00
        push    hl
        ld      hl,$550d
        call    l5945
        ld      (ix-$07),c
        ld      a,(ix-$07)
        or      a
        jp      nz,l5872
        ld      l,$01
        push    hl
        ld      hl,$5511
        call    l5945
        ld      (ix-$07),c
        ld      a,(ix-$07)
        or      a
        jp      nz,l5872
        ld      hl,$5515
        ld      ($f4e6),hl
l5790:  ld      hl,($f4e6)
        ld      a,(hl)
        inc     hl
        or      (hl)
        jr      z,l57ae                 ; (+$16)
        ld      l,(ix+$04)
        push    hl
        ld      hl,($f4e6)
        call    l5945
        ld      (ix-$07),c
        ld      a,(ix-$07)
        or      a
        jr      z,l57dd                 ; (+$32)
        jp      l5872
l57ae:  ld      hl,$e9ae
        ld      ($f4ea),hl
        ld      a,($f13e)
        ld      c,a
        add     a,a
        sbc     a,a
        ld      b,a
        push    bc
        ld      hl,$0012
        push    hl
        call    lba2d
        pop     hl
        ld      ($f4ec),hl
        ld      l,(ix+$04)
        push    hl
        ld      hl,$f4ea
        call    l5945
        ld      (ix-$07),c
        ld      a,(ix-$07)
        or      a
        jr      z,l57ea                 ; (+$10)
        jp      l5872
l57dd:  ld      hl,($f4e6)
        inc     hl
        inc     hl
        inc     hl
        inc     hl
        ld      ($f4e6),hl
        jp      l5790
l57ea:  sub     a
        ld      ($f4ea),a
        ld      a,$c0
        ld      ($f4eb),a
        ld      hl,($f4d7)
        ld      ($f4ec),hl
        ld      l,(ix+$04)
        push    hl
        ld      hl,$f4ea
        call    l5945
        ld      (ix-$07),c
        ld      a,(ix-$07)
        or      a
        jp      nz,l5872
        ld      hl,($f4d7)
        ld      bc,$c000
        add     hl,bc
        ld      ($f34f),hl
        ld      ($f427),hl
        ld      hl,$f2e8
        ld      ($f4e8),hl
l5820:  ld      hl,lf328
        ld      a,($f4e8)
        sub     l
        ld      a,($f4e9)
        sbc     a,h
        jr      nc,l5843                ; (+$16)
        ld      l,$00
        push    hl
        ld      hl,($f4e8)
        inc     hl
        inc     hl
        call    l59b7
        ld      (ix-$07),c
        ld      a,(ix-$07)
        or      a
        jr      z,l5858                 ; (+$17)
        jr      l5872                   ; (+$2f)
l5843:  ld      a,(ix+$04)
        or      a
        jr      z,l5864                 ; (+$1b)
        ld      a,($e800)
        or      a
        jr      z,l5864                 ; (+$15)
        ld      hl,$e800
        call    lbe71
        jp      lbe84
l5858:  ld      hl,($f4e8)
        inc     hl
        inc     hl
        inc     hl
        inc     hl
        ld      ($f4e8),hl
        jr      l5820                   ; (-$44)
l5864:  ld      l,$13
        call    l5a1c
        ld      (ix-$07),c
        ld      a,(ix-$07)
        or      a
        jr      z,l5882                 ; (+$10)
l5872:  ld      l,$13
        call    l5a1c
        ld      a,(ix+$04)
        or      a
        jr      z,l5890                 ; (+$13)
        call    l04ab
        jr      l5890                   ; (+$0e)
l5882:  ld      a,(ix+$04)
        or      a
        jr      z,l588b                 ; (+$03)
        call    lb8dd
l588b:  ld      c,$00
        jp      lbe84
l5890:  ld      c,(ix-$07)
        jp      lbe84
l5896:  rst     $20
        ld      hl,$fff9
        add     hl,sp
        ld      sp,hl
        ld      l,(ix+$04)
        ld      h,(ix+$05)
        inc     hl
        inc     hl
        ld      a,(hl)
        inc     hl
        ld      h,(hl)
        ld      l,a
        push    hl
        ld      l,(ix+$04)
        ld      h,(ix+$05)
        ld      a,(hl)
        inc     hl
        ld      h,(hl)
        ld      l,a
        ex      (sp),hl
        pop     bc
        add     hl,bc
        ld      ($f4ee),hl
        ld      l,(ix+$04)
        ld      h,(ix+$05)
        ld      a,(hl)
        inc     hl
        ld      h,(hl)
        ld      l,a
        ld      ($f4f0),hl
l58c6:  ld      hl,$f4ee
        ld      a,($f4f0)
        sub     (hl)
        ld      a,($f4f1)
        inc     hl
        sbc     a,(hl)
        jr      nc,l58f7                ; (+$23)
        ld      hl,($f4f0)
        ld      a,(hl)
        ld      ($f0c7),a
        ld      hl,$f0c5
        call    lae46
        ld      hl,($f4f0)
        ld      l,(hl)
        call    l5905
        ld      (ix-$07),c
        ld      a,(ix-$07)
        or      a
        jr      z,l58fc                 ; (+$0b)
        ld      c,(ix-$07)
        jp      lbe84
l58f7:  ld      c,$00
        jp      lbe84
l58fc:  ld      hl,($f4f0)
        inc     hl
        ld      ($f4f0),hl
        jr      l58c6                   ; (-$3f)
l5905:  rst     $20
        ld      hl,$fff9
        add     hl,sp
        ld      sp,hl
l590b:  ld      l,$a1
        call    lba5c
        ld      (ix-$07),c
        ld      l,(ix-$07)
        ld      a,($f4d9)
        ld      c,a
        and     l
        jr      z,l5922                 ; (+$05)
        ld      c,$01
        jp      lbe84
l5922:  ld      l,(ix-$07)
        bit     1,l
        jr      nz,l5937                ; (+$0e)
        ld      l,(ix+$04)
        push    hl
        ld      l,$a0
        call    lbe62
        ld      c,$00
        jp      lbe84
l5937:  ld      l,$00
        call    l767c
        ld      a,c
        or      a
        jr      z,l590b                 ; (-$35)
        ld      c,$02
        jp      lbe84
l5945:  rst     $20
        ld      hl,$fff9
        add     hl,sp
        ld      sp,hl
        ld      l,(ix+$04)
        ld      h,(ix+$05)
        inc     hl
        inc     hl
        ld      a,(hl)
        inc     hl
        ld      h,(hl)
        ld      l,a
        push    hl
        ld      l,(ix+$04)
        ld      h,(ix+$05)
        ld      a,(hl)
        inc     hl
        ld      h,(hl)
        ld      l,a
        ex      (sp),hl
        pop     bc
        add     hl,bc
        ld      ($f4f2),hl
        ld      l,(ix+$04)
        ld      h,(ix+$05)
        ld      a,(hl)
        inc     hl
        ld      h,(hl)
        ld      l,a
        ld      ($f4f4),hl
l5975:  ld      hl,$f4f2
        ld      a,($f4f4)
        sub     (hl)
        ld      a,($f4f5)
        inc     hl
        sbc     a,(hl)
        jr      nc,l599c                ; (+$19)
        ld      l,(ix+$06)
        push    hl
        ld      hl,($f4f4)
        call    l59b7
        ld      (ix-$07),c
        ld      a,(ix-$07)
        or      a
        jr      z,l59a1                 ; (+$0b)
        ld      c,(ix-$07)
        jp      lbe8b
l599c:  ld      c,$00
        jp      lbe8b
l59a1:  ld      hl,($f4f4)
        ld      a,(hl)
        ld      ($f0c7),a
        ld      hl,$f0c5
        call    lae46
        ld      hl,($f4f4)
        inc     hl
        ld      ($f4f4),hl
        jr      l5975                   ; (-$42)
l59b7:  rst     $20
        ld      hl,$fff9
        add     hl,sp
        ld      sp,hl
l59bd:  ld      l,$a1
        call    lba5c
        ld      (ix-$07),c
        ld      l,(ix-$07)
        ld      a,($f4d9)
        ld      c,a
        and     l
        jr      z,l59d4                 ; (+$05)
        ld      c,$01
        jp      lbe8b
l59d4:  ld      l,(ix-$07)
        bit     0,l
        jr      z,l59f8                 ; (+$1d)
        ld      l,$a0
        call    lba5c
        ld      (ix-$07),c
        ld      a,(ix+$06)
        or      a
        jr      z,l5a06                 ; (+$1d)
        ld      l,(ix+$04)
        ld      h,(ix+$05)
        ld      a,(ix-$07)
        ld      (hl),a
        ld      c,$00
        jp      lbe8b
l59f8:  ld      l,$00
        call    l767c
        ld      a,c
        or      a
        jr      z,l59bd                 ; (-$44)
        ld      c,$02
        jp      lbe8b
l5a06:  ld      l,(ix+$04)
        ld      h,(ix+$05)
        ld      a,(hl)
        cp      (ix-$07)
        jr      z,l5a17                 ; (+$05)
        ld      c,$01
        jp      lbe8b
l5a17:  ld      c,$00
        jp      lbe8b
l5a1c:  rst     $20
        ld      hl,$fff9
        add     hl,sp
        ld      sp,hl
l5a22:  ld      l,$a1
        call    lba5c
        ld      (ix-$07),c
        ld      l,(ix-$07)
        bit     0,l
        jr      z,l5a36                 ; (+$05)
        ld      l,$a0
        call    lba5c
l5a36:  ld      l,(ix-$07)
        bit     1,l
        jr      nz,l5a4b                ; (+$0e)
        ld      l,(ix+$04)
        push    hl
        ld      l,$a1
        call    lbe62
        ld      c,$00
        jp      lbe84
l5a4b:  ld      l,$00
        call    l767c
        ld      a,c
        or      a
        jr      z,l5a22                 ; (-$32)
        ld      c,$02
        jp      lbe84
        ld      d,e
        ld      d,h
        ld      b,l
        ld      d,b
        jr      nz,l5aa3                ; (+$44)
        ld      b,l
        ld      c,h
        ld      b,l
        ld      d,h
        ld      b,l
        ld      b,h
        nop     
        rst     $30
        ld      hl,$fff4
        add     hl,sp
        ld      sp,hl
        ld      hl,$f42a
        ld      a,($f35d)
        cp      (hl)
        jr      nz,l5a7a                ; (+$05)
        ld      a,($f35e)
        inc     hl
        cp      (hl)
l5a7a:  jr      nz,l5a99                ; (+$1d)
        ld      a,($f125)
        or      a
        jr      nz,l5a99                ; (+$17)
        ld      hl,$e7ff
        push    hl
        ld      hl,($f35b)
        call    lab95
        ld      a,c
        or      a
        jp      nz,l5afd
        ld      l,$53
        call    la840
        jp      l5afd
l5a99:  ld      hl,($f35d)
        ld      a,(hl)
        cp      $50
        jr      nz,l5aad                ; (+$0c)
        ld      a,($f125)
        or      a
        jr      nz,l5aad                ; (+$06)
        call    l736f
        jp      l5afd
l5aad:  ld      l,$58
        rst     $08
        ld      a,($f125)
        or      a
        jr      z,l5abf                 ; (+$09)
        ld      l,$75
        rst     $10
        sub     a
        ld      ($f125),a
        jr      l5afa                   ; (+$3b)
l5abf:  ld      hl,($f35d)
        push    hl
        ld      hl,($f34d)
        push    hl
        ld      hl,($f355)
        call    l9ad7
        ld      hl,($f355)
        ld      bc,($f35d)
        ld      a,l
        sub     c
        ld      l,a
        ld      a,h
        sbc     a,b
        ld      h,a
        ld      a,($f34d)
        sub     l
        ld      ($f34d),a
        ld      a,($f34e)
        sbc     a,h
        ld      ($f34e),a
        ld      hl,($f35d)
        ld      ($f355),hl
        call    l9b5f
        ld      l,c
        ld      h,b
        ld      ($f35d),hl
        ld      hl,$5a59
        rst     $28
l5afa:  call    laaca
l5afd:  jp      lbe72
        rst     $30
        sub     a
        ld      ($f125),a
        ld      hl,($f35d)
        ld      a,(hl)
        cp      $50
        jr      nz,l5b1c                ; (+$0f)
        call    l7fb4
        ld      a,c
        cp      $75
        jr      nz,l5b2e                ; (+$19)
        ld      l,$50
        call    la840
        jr      l5b5a                   ; (+$3e)
l5b1c:  ld      hl,($f355)
        ld      ($f35d),hl
        ld      a,(hl)
        cp      $50
        jr      nz,l5b33                ; (+$0c)
        ld      l,$50
        call    la840
        jr      l5b5a                   ; (+$2c)
l5b2e:  call    l736f
        jr      l5b5a                   ; (+$27)
l5b33:  ld      hl,($f355)
        call    l9c0b
        ld      l,c
        ld      h,b
        ld      ($f355),hl
        ld      l,$00
        push    hl
        ld      hl,($f355)
        ld      bc,($f35d)
        ld      a,l
        sub     c
        ld      l,a
        ld      a,h
        sbc     a,b
        ld      h,a
        push    hl
        ld      hl,($f35d)
        call    l9e92
        ld      l,c
        ld      h,b
        call    lb353
l5b5a:  jp      lbe72
        rst     $30
        ld      hl,($f35d)
        ld      a,(hl)
        cp      $53
        jr      nz,l5b72                ; (+$0c)
        ld      a,($f125)
        or      a
        jr      nz,l5b72                ; (+$06)
        call    l736f
        jp      l5bb9
l5b72:  ld      a,($f125)
        or      a
        jr      z,l5b80                 ; (+$08)
        ld      hl,($f35d)
        ld      a,(hl)
        cp      $50
        jr      nz,l5b8e                ; (+$0e)
l5b80:  ld      hl,($f35d)
        ld      ($f355),hl
        call    l9b5f
        ld      l,c
        ld      h,b
        ld      ($f35d),hl
l5b8e:  ld      hl,($f35d)
        ld      a,(hl)
        cp      $53
        jr      nz,l5b9d                ; (+$07)
        ld      l,$53
        call    la840
        jr      l5bb9                   ; (+$1c)
l5b9d:  ld      l,$00
        push    hl
        ld      hl,($f355)
        ld      bc,($f35d)
        ld      a,l
        sub     c
        ld      l,a
        ld      a,h
        sbc     a,b
        ld      h,a
        push    hl
        ld      hl,($f35d)
        call    l9e92
        ld      l,c
        ld      h,b
        call    lb353
l5bb9:  sub     a
        ld      ($f125),a
        jp      lbe72
        ld      c,l
        ld      c,c
        ld      d,e
        ld      d,e
        ld      c,c
        ld      c,(hl)
        ld      b,a
        jr      nz,l5c15                ; (+$4c)
        ld      b,c
        ld      b,d
        ld      b,l
        ld      c,h
        jr      nz,l5bcf                ; (+$00)
l5bcf:  ld      b,h
        ld      d,l
        ld      d,b
        ld      c,h
        ld      c,c
        ld      b,e
        ld      b,c
        ld      d,h
        ld      b,l
        jr      nz,l5c26                ; (+$4c)
        ld      b,c
        ld      b,d
        ld      b,l
        ld      c,h
        jr      nz,l5be0                ; (+$00)
l5be0:  rst     $30
        ld      hl,$ffca
        add     hl,sp
        ld      sp,hl
        ld      l,$58
        rst     $08
        ld      hl,l0020
        push    hl
        push    ix
        pop     bc
        ld      hl,$ffd6
        add     hl,bc
        call    lb8c3
        ld      hl,($f34d)
        ld      (hl),$2b
        ld      a,($f42a)
        ld      (ix-$32),a
        ld      a,($f42b)
        ld      (ix-$31),a
l5c08:  ld      l,$2b
        push    hl
        ld      l,(ix-$32)
        ld      h,(ix-$31)
        call    lb66a
        ld      (ix-$32),c
        ld      (ix-$31),b
        ld      hl,$f34d
        ld      a,(ix-$32)
        cp      (hl)
        jr      nz,l5c28                ; (+$05)
        ld      a,(ix-$31)
l5c26:  inc     hl
        cp      (hl)
l5c28:  jp      z,l5c7b
        ld      l,(ix-$32)
        ld      h,(ix-$31)
        inc     hl
        ld      a,(hl)
        ld      (ix-$09),a
        ld      a,(ix-$09)
        ld      c,a
        add     a,a
        sbc     a,a
        ld      b,a
        ld      l,c
        ld      h,b
        add     hl,hl
        push    hl
        push    ix
        pop     bc
        ld      hl,$ffd6
        add     hl,bc
        ex      (sp),hl
        pop     bc
        add     hl,bc
        ld      a,(hl)
        inc     hl
        or      (hl)
        jp      z,l5d00
        ld      hl,l5bcf
        rst     $28
        ld      l,(ix-$09)
        rst     $10
        ld      l,(ix-$32)
        ld      h,(ix-$31)
        call    l9b5f
        ld      l,c
        ld      h,b
        ld      ($f35d),hl
        ld      l,(ix-$32)
        ld      h,(ix-$31)
        ld      ($f355),hl
        ld      hl,($f34d)
        ld      (hl),$50
        call    laaca
        jp      lbe72
l5c7b:  ld      hl,($f34d)
        ld      (hl),$2c
        ld      a,($f42a)
        ld      (ix-$32),a
        ld      a,($f42b)
        ld      (ix-$31),a
l5c8c:  ld      l,$2c
        push    hl
        ld      l,(ix-$32)
        ld      h,(ix-$31)
        call    lb66a
        ld      (ix-$32),c
        ld      (ix-$31),b
        ld      hl,$f34d
        ld      a,(ix-$32)
        cp      (hl)
        jr      nz,l5cac                ; (+$05)
        ld      a,(ix-$31)
        inc     hl
        cp      (hl)
l5cac:  jp      z,l5d3b
        ld      l,(ix-$32)
        ld      h,(ix-$31)
        inc     hl
        ld      a,(hl)
        ld      (ix-$09),a
        ld      a,(ix-$09)
        ld      c,a
        add     a,a
        sbc     a,a
        ld      b,a
        ld      l,c
        ld      h,b
        add     hl,hl
        push    hl
        push    ix
        pop     bc
        ld      hl,$ffd6
        add     hl,bc
        ex      (sp),hl
        pop     bc
        add     hl,bc
        ld      a,(hl)
        inc     hl
        or      (hl)
        jp      nz,l5dcc
        ld      hl,$5bc0
        rst     $28
        ld      l,(ix-$09)
        rst     $10
        ld      l,(ix-$32)
        ld      h,(ix-$31)
        inc     hl
        inc     hl
        call    l9b5f
        ld      l,c
        ld      h,b
        ld      ($f355),hl
        call    l9b5f
        ld      l,c
        ld      h,b
        ld      ($f35d),hl
        ld      hl,($f34d)
        ld      (hl),$50
        call    laaca
        jp      lbe72
l5d00:  ld      a,(ix-$09)
        ld      c,a
        add     a,a
        sbc     a,a
        ld      b,a
        ld      l,c
        ld      h,b
        add     hl,hl
        push    hl
        push    ix
        pop     bc
        ld      hl,$ffd6
        add     hl,bc
        ex      (sp),hl
        pop     bc
        add     hl,bc
        ld      c,(ix-$32)
        ld      b,(ix-$31)
        ld      de,($f42a)
        ld      a,c
        sub     e
        ld      c,a
        ld      a,b
        sbc     a,d
        ld      b,a
        inc     bc
        inc     bc
        ld      (hl),c
        inc     hl
        ld      (hl),b
        ld      l,(ix-$32)
        ld      h,(ix-$31)
        inc     hl
        inc     hl
        ld      (ix-$32),l
        ld      (ix-$31),h
        jp      l5c08
l5d3b:  ld      hl,($f34d)
        ld      (hl),$50
        ld      hl,($f34d)
        inc     hl
        ld      (ix-$2e),l
        ld      (ix-$2d),h
        ld      (ix-$2b),$00
        ld      (ix-$07),$00
l5d52:  ld      a,(ix-$07)
        cp      $10
        jp      p,l5ddd
        ld      a,(ix-$07)
        ld      c,a
        add     a,a
        sbc     a,a
        ld      b,a
        ld      l,c
        ld      h,b
        add     hl,hl
        push    hl
        push    ix
        pop     bc
        ld      hl,$ffd6
        add     hl,bc
        ex      (sp),hl
        pop     bc
        add     hl,bc
        ld      a,(hl)
        ld      (ix-$36),a
        inc     hl
        ld      a,(hl)
        ld      (ix-$35),a
        ld      a,(ix-$36)
        or      (ix-$35)
        jp      z,l5e46
        inc     (ix-$2b)
        ld      l,(ix-$2e)
        ld      h,(ix-$2d)
        inc     (ix-$2e)
        jr      nz,l5d92                ; (+$03)
        inc     (ix-$2d)
l5d92:  ld      a,(ix-$07)
        ld      (hl),a
        ld      l,(ix-$2e)
        ld      h,(ix-$2d)
        inc     (ix-$2e)
        jr      nz,l5da4                ; (+$03)
        inc     (ix-$2d)
l5da4:  ld      a,(ix-$36)
        ld      (hl),a
        ld      l,(ix-$2e)
        ld      h,(ix-$2d)
        inc     (ix-$2e)
        jr      nz,l5db6                ; (+$03)
        inc     (ix-$2d)
l5db6:  push    hl
        ld      l,(ix-$36)
        ld      h,(ix-$35)
        push    hl
        ld      hl,l0008
        push    hl
        call    lba01
        pop     hl
        pop     bc
        ld      a,l
        ld      (bc),a
        jp      l5e46
l5dcc:  ld      l,(ix-$32)
        ld      h,(ix-$31)
        inc     hl
        inc     hl
        ld      (ix-$32),l
        ld      (ix-$31),h
        jp      l5c8c
l5ddd:  ld      l,(ix-$2e)
        ld      h,(ix-$2d)
        push    hl
        ld      hl,$e7ff
        push    hl
        ld      hl,($f35b)
        call    l9ad7
        ld      l,(ix-$2e)
        ld      h,(ix-$2d)
        ld      bc,($f357)
        ld      a,l
        sub     c
        ld      l,a
        ld      a,h
        sbc     a,b
        ld      h,a
        ld      bc,$ffff
        add     hl,bc
        ld      (ix-$30),l
        ld      (ix-$2f),h
        ld      a,($f429)
        inc     a
        ld      l,a
        ld      (ix-$07),l
l5e10:  ld      a,(ix-$07)
        cp      $64
        jp      p,l5e4c
        ld      a,(ix-$07)
        ld      c,a
        add     a,a
        sbc     a,a
        ld      b,a
        ld      l,c
        ld      h,b
        add     hl,hl
        ld      bc,$f35f
        add     hl,bc
        ld      a,(hl)
        inc     hl
        or      (hl)
        jr      z,l5e64                 ; (+$39)
        ld      a,(ix-$07)
        ld      c,a
        add     a,a
        sbc     a,a
        ld      b,a
        ld      l,c
        ld      h,b
        add     hl,hl
        ld      bc,$f35f
        add     hl,bc
        ld      a,(hl)
        add     a,(ix-$30)
        ld      (hl),a
        inc     hl
        ld      a,(hl)
        adc     a,(ix-$2f)
        ld      (hl),a
        jr      l5e64                   ; (+$1e)
l5e46:  inc     (ix-$07)
        jp      l5d52
l5e4c:  ld      hl,($f34f)
        ld      c,(ix-$30)
        ld      b,(ix-$2f)
        add     hl,bc
        ld      ($f34f),hl
        ld      ($f427),hl
        ld      l,$4d
        call    lab1d
        jp      lbe72
l5e64:  inc     (ix-$07)
        jp      l5e10
        rst     $30
        ld      hl,$fff6
        add     hl,sp
        ld      sp,hl
        ld      l,$71
        rst     $08
        ld      l,$58
        rst     $08
        ld      l,$10
        rst     $10
        ld      l,$72
        rst     $08
        ld      l,$00
        call    la3cd
        ld      (ix-$07),c
        ld      a,(ix-$07)
        or      a
        jp      z,l5f3d
        ld      a,($f140)
        cp      $02
        jr      nz,l5e98                ; (+$06)
        call    l9a22
        jp      lbe72
l5e98:  sub     a
        ld      ($f1a0),a
        ld      l,$00
        call    l947f
        ld      (ix-$0a),c
        ld      a,(ix-$0a)
        cp      $02
        jp      z,l5f3d
        ld      a,(ix-$07)
        cp      $01
        jr      nz,l5ec7                ; (+$14)
        ld      l,$63
        rst     $10
        call    l65bb
        ld      (ix-$09),c
        ld      a,(ix-$09)
        cp      $02
        jp      nz,l5f1a
        jp      l5f3d
l5ec7:  ld      (ix-$0a),$00
        sub     a
        ld      ($f13e),a
        ld      (ix-$08),$00
l5ed3:  ld      hl,$f13f
        ld      a,(ix-$08)
        cp      (hl)
        jp      p,l5f47
        ld      hl,$f139
        push    hl
        ld      a,(ix-$08)
        ld      c,a
        add     a,a
        sbc     a,a
        ld      b,a
        ld      l,c
        ld      h,b
        add     hl,hl
        add     hl,hl
        add     hl,hl
        ld      bc,$e96a
        add     hl,bc
        push    hl
        rst     $18
        pop     af
        ld      hl,$f121
        push    hl
        ld      a,(ix-$08)
        ld      c,a
        add     a,a
        sbc     a,a
        ld      b,a
        ld      l,c
        ld      h,b
        add     hl,hl
        add     hl,hl
        add     hl,hl
        ld      bc,$e96e
        add     hl,bc
        push    hl
        rst     $18
        pop     af
        call    l65bb
        ld      (ix-$09),c
        ld      a,(ix-$09)
        cp      $02
        jr      nz,l5f2b                ; (+$13)
        jr      l5f3d                   ; (+$23)
l5f1a:  ld      a,(ix-$0a)
        or      (ix-$09)
        ld      (ix-$0a),a
        jr      l5f47                   ; (+$22)
l5f25:  inc     (ix-$08)
        jp      l5ed3
l5f2b:  ld      a,(ix-$0a)
        or      (ix-$09)
        ld      (ix-$0a),a
        ld      l,$00
        call    l767c
        ld      a,c
        or      a
        jr      z,l5f25                 ; (-$18)
l5f3d:  ld      a,$01
        ld      ($f1a0),a
        ld      c,$02
        jp      lbe72
l5f47:  ld      a,(ix-$0a)
        or      a
        jr      nz,l5f51                ; (+$04)
        ld      c,$66
        jr      l5f53                   ; (+$02)
l5f51:  ld      c,$69
l5f53:  ld      l,c
        rst     $10
        ld      a,$01
        ld      ($f1a0),a
        ld      c,(ix-$0a)
        jp      lbe72
l5f60:  rst     $20
        ld      hl,$f4f6
        push    hl
        ld      l,(ix+$08)
        ld      h,(ix+$09)
        ld      c,(hl)
        inc     hl
        ld      b,(hl)
        push    bc
        ld      hl,$0012
        push    hl
        call    lba2d
        pop     hl
        ld      bc,$e9ae
        add     hl,bc
        push    hl
        rst     $18
        pop     af
        ld      hl,$f4fa
        push    hl
        ld      l,(ix+$08)
        ld      h,(ix+$09)
        ld      c,(hl)
        inc     hl
        ld      b,(hl)
        push    bc
        ld      hl,$0012
        push    hl
        call    lba2d
        pop     hl
        ld      bc,$e9b2
        add     hl,bc
        push    hl
        rst     $18
        pop     af
        ld      hl,$f4f6
        push    hl
        ld      l,(ix+$04)
        ld      h,(ix+$05)
        push    hl
        call    lbab0
        jr      nc,l5fda                ; (+$2f)
        ld      hl,$f4fa
        push    hl
        ld      l,(ix+$04)
        ld      h,(ix+$05)
        push    hl
        call    lbab0
        jp      c,l6150
        ld      l,(ix+$06)
        ld      h,(ix+$07)
        push    hl
        ld      hl,$f4fa
        push    hl
        call    lbab0
        jp      nc,l603e
        ld      a,($f13e)
        cp      $63
        jp      m,l6080
        ld      c,$01
        jp      lbe93
l5fda:  ld      l,(ix+$06)
        ld      h,(ix+$07)
        push    hl
        ld      hl,$f4f6
        push    hl
        call    lbab0
        jp      c,l6150
        ld      l,(ix+$06)
        ld      h,(ix+$07)
        push    hl
        ld      hl,$f4fa
        push    hl
        call    lbab0
        jp      nc,l6155
        ld      l,(ix+$08)
        ld      h,(ix+$09)
        ld      c,(hl)
        inc     hl
        ld      b,(hl)
        push    bc
        ld      hl,$0012
        push    hl
        call    lba2d
        pop     hl
        ld      bc,$e9ae
        add     hl,bc
        push    hl
        ld      l,(ix+$06)
        ld      h,(ix+$07)
        ld      de,$f935
        rst     $38
        ld      hl,$f935
        push    hl
        ld      a,($f0b6)
        ld      ($f93f),a
        add     a,a
        sbc     a,a
        ld      ($f940),a
        ld      ($f93e),a
        ld      ($f93d),a
        ld      hl,$f93d
        push    hl
        call    lba62
        rst     $18
        pop     af
        jp      l6150
l603e:  ld      l,(ix+$08)
        ld      h,(ix+$09)
        ld      c,(hl)
        inc     hl
        ld      b,(hl)
        push    bc
        ld      hl,$0012
        push    hl
        call    lba2d
        pop     hl
        ld      bc,$e9b2
        add     hl,bc
        push    hl
        ld      l,(ix+$04)
        ld      h,(ix+$05)
        ld      de,$f935
        rst     $38
        ld      hl,$f935
        push    hl
        ld      a,($f0b6)
        ld      ($f93f),a
        add     a,a
        sbc     a,a
        ld      ($f940),a
        ld      ($f93e),a
        ld      ($f93d),a
        ld      hl,$f93d
        push    hl
        call    lbdf7
        rst     $18
        pop     af
        jp      l6150
l6080:  ld      l,(ix+$08)
        ld      h,(ix+$09)
        ld      c,(hl)
        inc     hl
        ld      b,(hl)
        push    bc
        ld      hl,$0012
        push    hl
        call    lba2d
        pop     hl
        ld      bc,$e9ae
        add     hl,bc
        ld      ($f4fe),hl
        ld      bc,$0012
        add     hl,bc
        push    hl
        ld      a,($f13e)
        ld      l,a
        ld      a,($f13e)
        add     a,$01
        ld      ($f13e),a
        ld      a,l
        ld      c,a
        add     a,a
        sbc     a,a
        ld      b,a
        push    bc
        ld      hl,$0012
        push    hl
        call    lba2d
        pop     hl
        ld      bc,$e9ae
        add     hl,bc
        ld      bc,$ffff
        add     hl,bc
        push    hl
        ld      hl,($f4fe)
        call    l9ad7
        ld      l,(ix+$08)
        ld      h,(ix+$09)
        ld      c,(hl)
        inc     hl
        ld      b,(hl)
        push    bc
        ld      l,(ix+$08)
        ld      h,(ix+$09)
        inc     (hl)
        jr      nz,l60dc                ; (+$02)
        inc     hl
        inc     (hl)
l60dc:  ld      hl,$0012
        push    hl
        call    lba2d
        pop     hl
        ld      bc,$e9b2
        add     hl,bc
        push    hl
        ld      l,(ix+$04)
        ld      h,(ix+$05)
        ld      de,$f935
        rst     $38
        ld      hl,$f935
        push    hl
        ld      a,($f0b6)
        ld      ($f93f),a
        add     a,a
        sbc     a,a
        ld      ($f940),a
        ld      ($f93e),a
        ld      ($f93d),a
        ld      hl,$f93d
        push    hl
        call    lbdf7
        rst     $18
        pop     af
        ld      l,(ix+$08)
        ld      h,(ix+$09)
        ld      c,(hl)
        inc     hl
        ld      b,(hl)
        push    bc
        ld      hl,$0012
        push    hl
        call    lba2d
        pop     hl
        ld      bc,$e9ae
        add     hl,bc
        push    hl
        ld      l,(ix+$06)
        ld      h,(ix+$07)
        ld      de,$f935
        rst     $38
        ld      hl,$f935
        push    hl
        ld      a,($f0b6)
        ld      ($f93f),a
        add     a,a
        sbc     a,a
        ld      ($f940),a
        ld      ($f93e),a
        ld      ($f93d),a
        ld      hl,$f93d
        push    hl
        call    lba62
        rst     $18
        pop     af
l6150:  ld      c,$00
        jp      lbe93
l6155:  ld      l,(ix+$08)
        ld      h,(ix+$09)
        ld      c,(hl)
        inc     hl
        ld      b,(hl)
        push    bc
        ld      hl,$0012
        push    hl
        call    lba2d
        pop     hl
        ld      bc,$e9ae
        add     hl,bc
        ld      ($f4fe),hl
        push    hl
        ld      a,($f13e)
        ld      l,a
        ld      a,($f13e)
        sub     $01
        ld      ($f13e),a
        ld      a,l
        ld      c,a
        add     a,a
        sbc     a,a
        ld      b,a
        push    bc
        ld      hl,$0012
        push    hl
        call    lba2d
        pop     hl
        ld      bc,$e9ae
        add     hl,bc
        ld      bc,$ffff
        add     hl,bc
        push    hl
        ld      hl,($f4fe)
        ld      bc,$0012
        add     hl,bc
        call    l9ad7
        ld      l,(ix+$08)
        ld      h,(ix+$09)
        ld      a,(hl)
        sub     $01
        ld      (hl),a
        inc     hl
        ld      a,(hl)
        sbc     a,$00
        ld      (hl),a
        jp      l6150
l61ae:  rst     $20
        ld      hl,$f500
        push    hl
        ld      l,(ix+$06)
        ld      h,(ix+$07)
        ld      bc,$000a
        add     hl,bc
        ld      de,$f935
        rst     $38
        ld      hl,$f935
        push    hl
        call    lbb03
        rst     $18
        pop     af
        ld      l,(ix+$04)
        ld      h,(ix+$05)
        ld      bc,$000a
        add     hl,bc
        ld      de,$f935
        rst     $38
        ld      hl,$f935
        push    hl
        ld      hl,$f500
        push    hl
        call    lba8d
        pop     hl
        ld      a,(hl)
        inc     hl
        or      (hl)
        inc     hl
        or      (hl)
        inc     hl
        or      (hl)
        jp      nz,l623c
        ld      l,(ix+$06)
        ld      h,(ix+$07)
        push    hl
        ld      l,(ix+$04)
        ld      h,(ix+$05)
        ld      de,$f935
        rst     $38
        ld      hl,$f935
        push    hl
        ld      hl,$f500
        push    hl
        call    lba8d
        call    lbab0
        jr      c,l623c                 ; (+$2d)
        ld      l,(ix+$04)
        ld      h,(ix+$05)
        inc     hl
        inc     hl
        inc     hl
        inc     hl
        ld      de,$f935
        rst     $38
        ld      hl,$f935
        push    hl
        ld      hl,$f500
        push    hl
        call    lba8d
        ld      l,(ix+$06)
        ld      h,(ix+$07)
        inc     hl
        inc     hl
        inc     hl
        inc     hl
        push    hl
        call    lbab0
        jr      c,l623c                 ; (+$04)
        ld      c,$01
        jr      l623e                   ; (+$02)
l623c:  ld      c,$00
l623e:  jp      lbe8b
l6241:  rst     $20
        ld      l,(ix+$06)
        ld      h,(ix+$07)
        inc     hl
        inc     hl
        inc     hl
        inc     hl
        ld      de,$f935
        rst     $38
        ld      hl,$f935
        push    hl
        ld      a,($f0b6)
        ld      ($f93f),a
        add     a,a
        sbc     a,a
        ld      ($f940),a
        ld      ($f93e),a
        ld      ($f93d),a
        ld      hl,$f93d
        push    hl
        call    lba62
        ld      l,(ix+$04)
        ld      h,(ix+$05)
        push    hl
        call    lbad9
        jp      nz,l62cd
        ld      l,(ix+$04)
        ld      h,(ix+$05)
        ld      bc,l0008
        add     hl,bc
        push    hl
        ld      l,(ix+$06)
        ld      h,(ix+$07)
        ld      bc,l0008
        add     hl,bc
        pop     bc
        ld      a,(bc)
        cp      (hl)
        jr      nz,l62cd                ; (+$3a)
        ld      l,(ix+$04)
        ld      h,(ix+$05)
        ld      bc,$000a
        add     hl,bc
        push    hl
        ld      l,(ix+$06)
        ld      h,(ix+$07)
        ld      bc,$000a
        add     hl,bc
        push    hl
        call    lbad9
        jr      nz,l62cd                ; (+$1f)
        ld      l,(ix+$04)
        ld      h,(ix+$05)
        ld      bc,$000e
        add     hl,bc
        push    hl
        ld      l,(ix+$06)
        ld      h,(ix+$07)
        ld      bc,$000e
        add     hl,bc
        push    hl
        call    lbad9
        jr      nz,l62cd                ; (+$04)
        ld      c,$01
        jr      l62cf                   ; (+$02)
l62cd:  ld      c,$00
l62cf:  jp      lbe8b
l62d2:  rst     $20
        ld      hl,$fff0
        add     hl,sp
        ld      sp,hl
        ld      l,(ix+$04)
        ld      h,(ix+$05)
        call    lb06a
l62e1:  ld      (ix-$07),$01
        ld      l,$81
        call    lba5c
        ld      (ix-$0d),$00
        ld      a,(ix+$04)
        ld      (ix-$0a),a
        ld      a,(ix+$05)
        ld      (ix-$09),a
l62fa:  ld      a,($f13e)
        ld      e,a
        add     a,a
        sbc     a,a
        ld      d,a
        ld      a,(ix-$0a)
        sub     e
        ld      a,(ix-$09)
        sbc     a,d
        jp      p,l6362
        ld      l,(ix-$0a)
        ld      h,(ix-$09)
        push    hl
        ld      hl,$0012
        push    hl
        call    lba2d
        pop     hl
        ld      bc,$e9ae
        add     hl,bc
        ld      (ix-$0c),l
        ld      (ix-$0b),h
        ld      l,(ix-$0c)
        ld      h,(ix-$0b)
        ld      bc,l0008
        add     hl,bc
        ld      a,(hl)
        cp      $01
        jp      nz,l641b
        ld      hl,$f19c
        push    hl
        ld      l,(ix-$0c)
        ld      h,(ix-$0b)
        push    hl
        rst     $18
        pop     af
        sub     a
        ld      ($f198),a
        ld      ($f199),a
        ld      ($f19a),a
        ld      ($f19b),a
        ld      l,$03
        call    l8b1d
        ld      (ix-$0e),c
        ld      a,(ix-$0e)
        cp      $02
        jp      nz,l6426
        jp      l6496
l6362:  ld      l,(ix+$04)
        ld      h,(ix+$05)
        inc     hl
        ld      (ix-$0a),l
        ld      (ix-$09),h
        ld      l,(ix-$0a)
        ld      h,(ix-$09)
        push    hl
        ld      hl,$0012
        push    hl
        call    lba2d
        pop     hl
        ld      bc,$e9ae
        add     hl,bc
        ld      (ix-$10),l
        ld      (ix-$0f),h
        ld      l,(ix-$10)
        ld      h,(ix-$0f)
        ld      bc,$ffee
        add     hl,bc
        ld      (ix-$0c),l
        ld      (ix-$0b),h
l6398:  ld      a,($f13e)
        ld      e,a
        add     a,a
        sbc     a,a
        ld      d,a
        ld      a,(ix-$0a)
        sub     e
        ld      a,(ix-$09)
        sbc     a,d
        jp      p,l654c
        ld      l,(ix-$0c)
        ld      h,(ix-$0b)
        ld      bc,l0008
        add     hl,bc
        push    hl
        ld      l,(ix-$10)
        ld      h,(ix-$0f)
        ld      bc,l0008
        add     hl,bc
        pop     bc
        ld      a,(bc)
        cp      (hl)
        jp      nz,l64dd
        ld      l,(ix-$0c)
        ld      h,(ix-$0b)
        inc     hl
        inc     hl
        inc     hl
        inc     hl
        ld      de,$f935
        rst     $38
        ld      hl,$f935
        push    hl
        ld      a,($f0b6)
        ld      ($f93f),a
        add     a,a
        sbc     a,a
        ld      ($f940),a
        ld      ($f93e),a
        ld      ($f93d),a
        ld      hl,$f93d
        push    hl
        call    lba62
        ld      l,(ix-$10)
        ld      h,(ix-$0f)
        push    hl
        call    lbab0
        jp      nc,l650a
        ld      l,(ix-$0c)
        ld      h,(ix-$0b)
        inc     hl
        inc     hl
        inc     hl
        inc     hl
        push    hl
        ld      l,(ix-$10)
        ld      h,(ix-$0f)
        inc     hl
        inc     hl
        inc     hl
        inc     hl
        push    hl
        call    lbab0
        jp      c,l64dd
        jp      l650a
l641b:  inc     (ix-$0a)
        jr      nz,l6423                ; (+$03)
        inc     (ix-$09)
l6423:  jp      l62fa
l6426:  ld      a,(ix-$0d)
        or      (ix-$0e)
        ld      (ix-$0d),a
        ld      l,$05
        call    l8b1d
        ld      (ix-$0e),c
        ld      a,(ix-$0e)
        cp      $02
        jp      z,l6496
        ld      a,(ix-$0d)
        or      (ix-$0e)
        ld      (ix-$0d),a
        ld      l,(ix-$0c)
        ld      h,(ix-$0b)
        ld      bc,$000e
        add     hl,bc
        push    hl
        ld      hl,$f198
        ld      de,$f935
        rst     $38
        ld      hl,$f935
        push    hl
        call    lbb03
        call    lba8d
        pop     af
        ld      hl,$f198
        push    hl
        ld      hl,$f0d4
        push    hl
        rst     $18
        pop     af
        ld      l,$03
        call    l8b1d
        ld      (ix-$0e),c
        ld      a,(ix-$0e)
        cp      $02
        jr      z,l6496                 ; (+$18)
        ld      a,(ix-$0d)
        or      (ix-$0e)
        ld      (ix-$0d),a
        ld      l,$05
        call    l8b1d
        ld      (ix-$0e),c
        ld      a,(ix-$0e)
        cp      $02
        jr      nz,l649b                ; (+$05)
l6496:  ld      c,$02
        jp      lbe84
l649b:  ld      a,(ix-$0d)
        or      (ix-$0e)
        ld      (ix-$0d),a
        ld      l,(ix-$0c)
        ld      h,(ix-$0b)
        ld      bc,$000e
        add     hl,bc
        push    hl
        ld      hl,$f198
        push    hl
        call    lba8d
        pop     hl
        ld      a,(hl)
        inc     hl
        or      (hl)
        inc     hl
        or      (hl)
        inc     hl
        or      (hl)
        jp      nz,l641b
        ld      l,(ix-$0a)
        ld      h,(ix-$09)
        ld      a,(ix-$0a)
        sub     $01
        ld      (ix-$0a),a
        ld      a,(ix-$09)
        sbc     a,$00
        ld      (ix-$09),a
        call    lb01b
        jp      l641b
l64dd:  ld      l,(ix-$10)
        ld      h,(ix-$0f)
        push    hl
        ld      l,(ix-$10)
        ld      h,(ix-$0f)
        ld      a,l
        add     a,$12
        ld      l,a
        ld      a,h
        adc     a,$00
        ld      h,a
        ld      (ix-$10),l
        ld      (ix-$0f),h
        pop     hl
        ld      (ix-$0c),l
        ld      (ix-$0b),h
        inc     (ix-$0a)
        jr      nz,l6507                ; (+$03)
        inc     (ix-$09)
l6507:  jp      l6398
l650a:  ld      l,(ix-$0c)
        ld      h,(ix-$0b)
        inc     hl
        inc     hl
        inc     hl
        inc     hl
        push    hl
        ld      l,(ix-$10)
        ld      h,(ix-$0f)
        inc     hl
        inc     hl
        inc     hl
        inc     hl
        push    hl
        rst     $18
        pop     af
        ld      l,(ix-$0c)
        ld      h,(ix-$0b)
        ld      bc,$000e
        add     hl,bc
        push    hl
        ld      l,(ix-$10)
        ld      h,(ix-$0f)
        ld      bc,$000e
        add     hl,bc
        push    hl
        call    lba8d
        pop     af
        ld      (ix-$07),$00
        ld      l,(ix-$0a)
        ld      h,(ix-$09)
        call    lb01b
        jp      l6398
l654c:  ld      a,(ix-$07)
        or      a
        jp      z,l62e1
        ld      c,(ix-$0d)
        jp      lbe84
l6559:  rst     $20
        push    af
        push    af
        push    af
        push    af
        ld      a,(ix+$04)
        ld      (ix-$08),a
        add     a,a
        sbc     a,a
        ld      (ix-$07),a
l6569:  ld      a,($f13e)
        ld      e,a
        add     a,a
        sbc     a,a
        ld      d,a
        ld      a,(ix-$08)
        sub     e
        ld      a,(ix-$07)
        sbc     a,d
        jp      p,l65ae
        ld      l,(ix-$08)
        ld      h,(ix-$07)
        push    hl
        ld      hl,$0012
        push    hl
        call    lba2d
        pop     hl
        ld      bc,$e9b6
        add     hl,bc
        ld      a,(hl)
        cp      $01
        jr      nz,l65b1                ; (+$1e)
        ld      l,(ix-$08)
        ld      h,(ix-$07)
        ld      a,(ix-$08)
        sub     $01
        ld      (ix-$08),a
        ld      a,(ix-$07)
        sbc     a,$00
        ld      (ix-$07),a
        call    lb01b
        jr      l65b1                   ; (+$03)
l65ae:  jp      lbe84
l65b1:  inc     (ix-$08)
        jr      nz,l65b9                ; (+$03)
        inc     (ix-$07)
l65b9:  jr      l6569                   ; (-$52)
l65bb:  rst     $30
        ld      hl,$fff0
        add     hl,sp
        ld      sp,hl
        call    la466
        ld      a,($f13e)
        ld      (ix-$08),a
        add     a,a
        sbc     a,a
        ld      (ix-$07),a
        ld      l,$71
        rst     $08
        ld      l,$79
        rst     $10
        ld      l,$60
        rst     $10
        ld      l,$04
        push    hl
        ld      l,$10
        push    hl
        ld      hl,$f139
        call    l7fc5
        ld      l,$7f
        rst     $10
        ld      l,$72
        rst     $08
        ld      a,($f114)
        ld      (ix-$0f),a
        ld      a,($f114)
        and     $fe
        ld      ($f114),a
        ld      (ix-$0d),$00
        sub     a
        ld      ($f1a0),a
        ld      hl,$f51a
        push    hl
        ld      hl,$f139
        push    hl
        rst     $18
        pop     af
l660a:  ld      hl,$f508
        push    hl
        ld      hl,$f51a
        push    hl
        rst     $18
        pop     af
        call    l6a34
        ld      (ix-$0e),c
        ld      a,(ix-$0e)
        cp      $02
        jp      z,l68aa
        ld      a,(ix-$0d)
        or      (ix-$0e)
        ld      (ix-$0d),a
        ld      hl,$f51a
        push    hl
        ld      hl,$f50c
        push    hl
        rst     $18
        pop     af
        ld      a,($f510)
        or      a
        jr      z,l6649                 ; (+$0e)
        ld      l,$00
        call    lb2ce
        ld      a,c
        cp      $02
        jp      nz,l6689
        jp      l68aa
l6649:  ld      hl,$f51a
        push    hl
        ld      hl,$f121
        push    hl
        call    lbab0
        jp      c,l6883
        ld      a,(ix-$0f)
        ld      ($f114),a
        ld      l,$71
        rst     $08
        ld      l,$59
        rst     $08
        ld      l,$5a
        rst     $08
        ld      l,$5a
        rst     $08
        ld      l,$78
        rst     $10
        ld      l,$7f
        rst     $10
        ld      l,$72
        rst     $08
        ld      l,(ix-$08)
        ld      h,(ix-$07)
        call    l62d2
        ld      (ix-$0e),c
        ld      a,(ix-$0e)
        cp      $02
        jp      nz,l68dc
        jp      l68aa
l6689:  call    l701c
        ld      (ix-$0e),c
        ld      a,(ix-$0e)
        cp      $02
        jp      z,l68aa
        ld      a,(ix-$0d)
        or      (ix-$0e)
        ld      (ix-$0d),a
        ld      a,($f510)
        or      a
        jp      z,l6649
        ld      a,($f13e)
        ld      e,a
        add     a,a
        sbc     a,a
        ld      d,a
        ld      a,(ix-$08)
        cp      e
        jr      nz,l66b8                ; (+$04)
        ld      a,(ix-$07)
        cp      d
l66b8:  jr      nz,l66c5                ; (+$0b)
        ld      a,($f13e)
        cp      $64
        jp      m,l6707
        jp      l685e
l66c5:  ld      a,($f13e)
        add     a,$ff
        ld      l,a
        ld      (ix-$0a),a
        add     a,a
        sbc     a,a
        ld      (ix-$09),a
l66d3:  ld      a,(ix-$0a)
        sub     (ix-$08)
        ld      a,(ix-$09)
        sbc     a,(ix-$07)
        jp      m,l672f
        ld      hl,$f508
        push    hl
        ld      l,(ix-$0a)
        ld      h,(ix-$09)
        push    hl
        ld      hl,$0012
        push    hl
        call    lba2d
        pop     hl
        ld      bc,$e9ae
        add     hl,bc
        call    l61ae
        ld      a,c
        or      a
        jp      z,l6787
        sub     a
        ld      ($f510),a
        jr      l672f                   ; (+$28)
l6707:  ld      a,($f13e)
        ld      l,a
        ld      a,($f13e)
        add     a,$01
        ld      ($f13e),a
        ld      a,l
        ld      c,a
        add     a,a
        sbc     a,a
        ld      b,a
        push    bc
        ld      hl,$0012
        push    hl
        call    lba2d
        pop     hl
        ld      bc,$e9ae
        add     hl,bc
        push    hl
        ld      hl,$f508
        call    laff8
        jp      l6649
l672f:  ld      a,($f510)
        or      a
        jp      z,l6649
        ld      a,($f13e)
        ld      c,a
        add     a,a
        sbc     a,a
        ld      b,a
        push    bc
        ld      hl,$0012
        push    hl
        call    lba2d
        pop     hl
        ld      bc,$e99c
        add     hl,bc
        push    hl
        ld      hl,$f508
        call    l6241
        ld      a,c
        or      a
        jp      z,l67f6
        ld      a,($f13e)
        ld      c,a
        add     a,a
        sbc     a,a
        ld      b,a
        push    bc
        ld      hl,$0012
        push    hl
        call    lba2d
        pop     hl
        ld      bc,$e9a0
        add     hl,bc
        push    hl
        ld      hl,$f50c
        push    hl
        rst     $18
        pop     af
        jp      l6649
l6774:  ld      a,(ix-$0a)
        sub     $01
        ld      (ix-$0a),a
        ld      a,(ix-$09)
        sbc     a,$00
        ld      (ix-$09),a
        jp      l66d3
l6787:  ld      hl,$f512
        ld      a,(hl)
        inc     hl
        or      (hl)
        inc     hl
        or      (hl)
        inc     hl
        or      (hl)
        jr      nz,l6798                ; (+$05)
        ld      bc,$0001
        jr      l679b                   ; (+$03)
l6798:  ld      bc,l0000
l679b:  ld      a,b
        add     a,a
        sbc     a,a
        ld      ($f935),a
        ld      ($f936),a
        ld      a,b
        ld      ($f938),a
        ld      a,c
        ld      ($f937),a
        ld      hl,$f935
        push    hl
        ld      l,(ix-$0a)
        ld      h,(ix-$09)
        push    hl
        ld      hl,$0012
        push    hl
        call    lba2d
        pop     hl
        ld      bc,$e9b8
        add     hl,bc
        ld      de,$f93d
        rst     $38
        ld      hl,$f93d
        push    hl
        call    lbb03
        call    lba8d
        pop     hl
        ld      a,(hl)
        inc     hl
        or      (hl)
        inc     hl
        or      (hl)
        inc     hl
        or      (hl)
        jp      z,l6774
        push    ix
        pop     bc
        ld      hl,$fff6
        add     hl,bc
        push    hl
        ld      hl,$f50c
        push    hl
        ld      hl,$f508
        call    l5f60
        ld      a,c
        or      a
        jp      z,l6774
        jp      l685e
l67f6:  ld      a,($f13e)
        cp      $64
        jp      m,l6814
        ld      l,(ix-$08)
        ld      h,(ix-$07)
        call    l62d2
        ld      (ix-$0e),c
        ld      a,(ix-$0e)
        cp      $02
        jr      nz,l683c                ; (+$2b)
        jp      l68aa
l6814:  ld      a,($f13e)
        ld      l,a
        ld      a,($f13e)
        add     a,$01
        ld      ($f13e),a
        ld      a,l
        ld      c,a
        add     a,a
        sbc     a,a
        ld      b,a
        push    bc
        ld      hl,$0012
        push    hl
        call    lba2d
        pop     hl
        ld      bc,$e9ae
        add     hl,bc
        push    hl
        ld      hl,$f508
        call    laff8
        jp      l6649
l683c:  ld      a,(ix-$0d)
        or      (ix-$0e)
        ld      (ix-$0d),a
        ld      a,($f13e)
        cp      $64
        jp      m,l6814
        ld      l,(ix-$08)
        ld      h,(ix-$07)
        call    l6559
        ld      a,($f13e)
        cp      $64
        jp      m,l6814
l685e:  ld      a,(ix-$0f)
        ld      ($f114),a
        ld      a,($f140)
        ld      (ix-$10),a
        ld      a,$01
        ld      ($f140),a
        ld      l,$58
        rst     $08
        ld      l,$47
        rst     $10
        ld      a,(ix-$10)
        cp      $03
        jp      nz,l6a1f
        call    la86f
        jp      l6a1f
l6883:  ld      hl,$f51a
        push    hl
        ld      a,($f0b6)
        ld      ($f937),a
        add     a,a
        sbc     a,a
        ld      ($f938),a
        ld      ($f936),a
        ld      ($f935),a
        ld      hl,$f935
        push    hl
        call    lba62
        pop     af
        ld      l,$00
        call    lb2ce
        ld      a,c
        cp      $02
        jr      nz,l68ba                ; (+$10)
l68aa:  ld      a,(ix-$0f)
        ld      ($f114),a
        ld      a,$01
        ld      ($f1a0),a
        ld      c,$02
        jp      lbe72
l68ba:  ld      a,($f51c)
        or      a
        jp      nz,l660a
        ld      l,$71
        rst     $08
        ld      l,$59
        rst     $08
        ld      l,$04
        push    hl
        ld      l,$10
        push    hl
        ld      hl,$f51a
        call    l7fc5
        ld      l,$7f
        rst     $10
        ld      l,$72
        rst     $08
        jp      l660a
l68dc:  ld      a,(ix-$0d)
        or      (ix-$0e)
        ld      (ix-$0d),a
        ld      a,(ix-$08)
        ld      (ix-$0a),a
        ld      a,(ix-$07)
        ld      (ix-$09),a
l68f1:  ld      a,($f13e)
        ld      e,a
        add     a,a
        sbc     a,a
        ld      d,a
        ld      a,(ix-$0a)
        sub     e
        ld      a,(ix-$09)
        sbc     a,d
        jp      p,l6910
        ld      l,$00
        call    lb2ce
        ld      a,c
        cp      $02
        jr      nz,l6936                ; (+$29)
        jp      l68aa
l6910:  ld      l,$71
        rst     $08
        ld      l,$5a
        rst     $08
        ld      l,$7f
        push    hl
        ld      l,$ff
        call    l7f65
        ld      l,$72
        rst     $08
        ld      a,$01
        ld      ($f1a0),a
        ld      c,(ix-$0d)
        jp      lbe72
l692c:  inc     (ix-$0a)
        jr      nz,l6934                ; (+$03)
        inc     (ix-$09)
l6934:  jr      l68f1                   ; (-$45)
l6936:  ld      l,(ix-$0a)
        ld      h,(ix-$09)
        push    hl
        ld      hl,$0012
        push    hl
        call    lba2d
        pop     hl
        ld      bc,$e9b6
        add     hl,bc
        ld      a,(hl)
        cp      $03
        jr      nz,l692c                ; (-$22)
        ld      l,$00
        push    hl
        ld      l,(ix-$0a)
        ld      h,(ix-$09)
        push    hl
        ld      hl,$0012
        push    hl
        call    lba2d
        pop     hl
        ld      bc,$e9b2
        add     hl,bc
        push    hl
        ld      l,(ix-$0a)
        ld      h,(ix-$09)
        push    hl
        ld      hl,$0012
        push    hl
        call    lba2d
        pop     hl
        ld      bc,$e9ae
        add     hl,bc
        call    lacfa
        ld      (ix-$0e),c
        ld      a,(ix-$0e)
        cp      $02
        jp      z,l68aa
        ld      a,(ix-$0d)
        or      (ix-$0e)
        ld      (ix-$0d),a
        ld      l,(ix-$0a)
        ld      h,(ix-$09)
        push    hl
        ld      hl,$0012
        push    hl
        call    lba2d
        pop     hl
        ld      bc,$e9bc
        add     hl,bc
        ld      a,($f345)
        ld      (hl),a
        ld      a,($f346)
        inc     hl
        ld      (hl),a
        ld      a,(ix-$08)
        ld      (ix-$0c),a
        ld      a,(ix-$07)
        ld      (ix-$0b),a
l69b7:  ld      a,(ix-$0c)
        sub     (ix-$0a)
        ld      a,(ix-$0b)
        sbc     a,(ix-$09)
        jp      p,l692c
        ld      l,(ix-$0a)
        ld      h,(ix-$09)
        push    hl
        ld      hl,$0012
        push    hl
        call    lba2d
        pop     hl
        ld      bc,$e9bc
        add     hl,bc
        push    hl
        ld      l,(ix-$0c)
        ld      h,(ix-$0b)
        push    hl
        ld      hl,$0012
        push    hl
        call    lba2d
        pop     hl
        ld      bc,$e9bc
        add     hl,bc
        pop     bc
        ld      a,(bc)
        cp      (hl)
        jr      nz,l69f6                ; (+$04)
        inc     bc
        ld      a,(bc)
        inc     hl
        cp      (hl)
l69f6:  jr      nz,l6a14                ; (+$1c)
        ld      l,(ix-$0a)
        ld      h,(ix-$09)
        ld      a,(ix-$0a)
        sub     $01
        ld      (ix-$0a),a
        ld      a,(ix-$09)
        sbc     a,$00
        ld      (ix-$09),a
        call    lb01b
        jp      l692c
l6a14:  inc     (ix-$0c)
        jr      nz,l6a1c                ; (+$03)
        inc     (ix-$0b)
l6a1c:  jp      l69b7
l6a1f:  ld      a,($f126)
        ld      ($e969),a
        ld      a,$45
        ld      ($f126),a
        ld      a,$01
        ld      ($f1a0),a
        ld      c,$02
        jp      lbe72
l6a34:  rst     $30
        ld      hl,$fff6
        add     hl,sp
        ld      sp,hl
        ld      hl,$f121
        push    hl
        ld      hl,$f526
        push    hl
        ld      a,($f0b6)
        cpl     
        inc     a
        and     $3f
        ld      l,a
        ld      c,l
        ld      b,h
        ld      a,c
        ld      ($f937),a
        add     a,a
        sbc     a,a
        ld      ($f938),a
        ld      ($f936),a
        ld      ($f935),a
        ld      hl,$f935
        push    hl
        ld      hl,$f19c
        push    hl
        ld      hl,$f508
        push    hl
        rst     $18
        call    lbdd4
        rst     $18
        call    lbab0
        jr      nc,l6a7b                ; (+$0a)
        ld      hl,$f526
        push    hl
        ld      hl,$f121
        push    hl
        rst     $18
        pop     af
l6a7b:  ld      hl,$f50c
        push    hl
        ld      hl,$f526
        push    hl
        rst     $18
        pop     af
        sub     a
        ld      ($f512),a
        ld      ($f513),a
        ld      ($f514),a
        ld      ($f515),a
        ld      (ix-$09),$00
        ld      l,$0d
        call    l8b1d
        ld      (ix-$0a),c
        ld      a,(ix-$0a)
        cp      $02
        jp      z,l6f56
        ld      a,(ix-$09)
        or      (ix-$0a)
        ld      (ix-$09),a
        ld      hl,$f516
        push    hl
        ld      hl,$f347
        ld      de,$f935
        rst     $38
        ld      hl,$f935
        push    hl
        ld      hl,$f0d4
        push    hl
        call    lbe23
        rst     $18
        pop     af
        ld      hl,$f516
        ld      a,(hl)
        inc     hl
        or      (hl)
        inc     hl
        or      (hl)
        inc     hl
        or      (hl)
        jr      z,l6b0e                 ; (+$3b)
        ld      hl,$f19c
        ld      de,$f935
        rst     $38
        ld      hl,$f935
        push    hl
        ld      a,$3f
        ld      ($f93f),a
        add     a,a
        sbc     a,a
        ld      ($f940),a
        ld      ($f93e),a
        ld      ($f93d),a
        ld      hl,$f93d
        push    hl
        call    lba8d
        pop     hl
        ld      a,(hl)
        inc     hl
        or      (hl)
        inc     hl
        or      (hl)
        inc     hl
        or      (hl)
        jp      nz,l6e78
        ld      hl,$f516
        push    hl
        ld      hl,$f0d4
        push    hl
        call    lbad9
        jp      nz,l6e78
l6b0e:  ld      hl,$f516
        ld      a,(hl)
        inc     hl
        or      (hl)
        inc     hl
        or      (hl)
        inc     hl
        or      (hl)
        jr      z,l6b22                 ; (+$08)
        ld      a,$02
        ld      ($f510),a
l6b1f:  jp      l6bca
l6b22:  ld      hl,$f508
        ld      de,$f935
        rst     $38
        ld      hl,$f935
        push    hl
        ld      a,$3f
        ld      ($f93f),a
        add     a,a
        sbc     a,a
        ld      ($f940),a
        ld      ($f93e),a
        ld      ($f93d),a
        ld      hl,$f93d
        push    hl
        call    lba8d
        pop     hl
        ld      a,(hl)
        inc     hl
        or      (hl)
        inc     hl
        or      (hl)
        inc     hl
        or      (hl)
        jr      z,l6b55                 ; (+$07)
        sub     a
        ld      ($f510),a
        jp      l6bca
l6b55:  ld      a,$03
        ld      ($f510),a
        ld      (ix-$08),$01
        ld      l,$05
        call    l8b1d
        ld      (ix-$0a),c
        ld      a,(ix-$0a)
        cp      $02
        jp      z,l6f56
        ld      a,(ix-$09)
        or      (ix-$0a)
        ld      (ix-$09),a
        ld      hl,$f51e
        push    hl
        ld      hl,$f198
        push    hl
        rst     $18
        pop     af
        ld      l,$05
        call    l8b1d
        ld      (ix-$0a),c
        ld      a,(ix-$0a)
        cp      $02
        jp      z,l6f56
        ld      a,(ix-$09)
        or      (ix-$0a)
        ld      (ix-$09),a
        ld      hl,$f51e
        push    hl
        ld      hl,$f198
        push    hl
        call    lbad9
        jr      z,l6bca                 ; (+$23)
        ld      l,$05
        call    l8b1d
        ld      (ix-$0a),c
        ld      a,(ix-$0a)
        cp      $02
        jp      z,l6f56
        ld      a,(ix-$09)
        or      (ix-$0a)
        ld      (ix-$09),a
        ld      hl,$f51e
        push    hl
        ld      hl,$f198
        push    hl
        rst     $18
        pop     af
l6bca:  ld      hl,$f19c
        push    hl
        ld      hl,$f526
        push    hl
        call    lbad9
        jr      z,l6c06                 ; (+$2f)
        ld      hl,$f19c
        push    hl
        ld      a,($f0b6)
        ld      ($f937),a
        add     a,a
        sbc     a,a
        ld      ($f938),a
        ld      ($f936),a
        ld      ($f935),a
        ld      hl,$f935
        push    hl
        call    lba62
        pop     af
        ld      l,$0d
        call    l8b1d
        ld      (ix-$0a),c
        ld      a,(ix-$0a)
        cp      $02
        jr      nz,l6c1c                ; (+$19)
        jp      l6f56
l6c06:  ld      a,($f510)
        cp      $03
        jp      nz,l6ccd
        ld      a,(ix-$08)
        or      a
        jp      z,l6ccd
        sub     a
        ld      ($f510),a
        jp      l6ccd
l6c1c:  ld      a,(ix-$09)
        or      (ix-$0a)
        ld      (ix-$09),a
        ld      hl,$f347
        ld      de,$f935
        rst     $38
        ld      hl,$f935
        push    hl
        ld      hl,$f0d4
        push    hl
        call    lbe23
        ld      hl,$f516
        push    hl
        call    lbad9
        jr      z,l6c6c                 ; (+$2c)
        ld      hl,$f50c
        push    hl
        ld      hl,$f19c
        ld      de,$f935
        rst     $38
        ld      hl,$f935
        push    hl
        ld      a,($f0b6)
        ld      ($f93f),a
        add     a,a
        sbc     a,a
        ld      ($f940),a
        ld      ($f93e),a
        ld      ($f93d),a
        ld      hl,$f93d
        push    hl
        call    lbdf7
        rst     $18
        pop     af
        jp      l6c06
l6c6c:  ld      a,($f510)
        cp      $03
        jp      nz,l6bca
        ld      a,(ix-$08)
        or      a
        jp      z,l6bca
        ld      l,$05
        call    l8b1d
        ld      (ix-$0a),c
        ld      a,(ix-$0a)
        cp      $02
        jp      z,l6f56
        ld      a,(ix-$09)
        or      (ix-$0a)
        ld      (ix-$09),a
        ld      hl,$f198
        push    hl
        ld      hl,$f51e
        push    hl
        call    lbad9
        jp      z,l6bca
        ld      hl,$f19c
        ld      de,$f935
        rst     $38
        ld      hl,$f935
        push    hl
        ld      hl,$f198
        push    hl
        call    lbe23
        ld      hl,$f0d4
        push    hl
        call    lba8d
        pop     hl
        ld      a,(hl)
        inc     hl
        or      (hl)
        inc     hl
        or      (hl)
        inc     hl
        or      (hl)
        jp      z,l6bca
        ld      (ix-$08),$00
        jp      l6bca
l6ccd:  ld      a,($f510)
        or      a
        jr      z,l6d13                 ; (+$40)
        ld      hl,$f50c
        ld      de,$f935
        rst     $38
        ld      hl,$f935
        push    hl
        ld      hl,$f508
        push    hl
        call    lbdf7
        ld      l,$40
        ld      a,($f0b6)
        ld      c,a
        ld      a,l
        sub     c
        ld      l,a
        ld      c,l
        ld      b,h
        ld      a,c
        ld      ($f93f),a
        add     a,a
        sbc     a,a
        ld      ($f940),a
        ld      ($f93e),a
        ld      ($f93d),a
        ld      hl,$f93d
        push    hl
        call    lbab0
        jr      nc,l6d19                ; (+$11)
        ld      a,($f510)
        cp      $02
        jp      nz,l6d72
        jp      l6e78
l6d13:  ld      c,(ix-$09)
        jp      lbe72
l6d19:  ld      a,($f510)
        cp      $02
        jp      nz,l6d79
        ld      hl,$f522
        push    hl
        ld      hl,$f508
        push    hl
        rst     $18
        pop     af
l6d2b:  ld      hl,$f19c
        push    hl
        ld      hl,$f522
        push    hl
        rst     $18
        pop     af
        ld      hl,$f198
        push    hl
        ld      hl,$f19c
        ld      de,$f935
        rst     $38
        ld      hl,$f935
        push    hl
        ld      a,($f0d9)
        ld      c,a
        add     a,a
        sbc     a,a
        ld      b,a
        push    bc
        call    lbd0f
        ld      hl,$f19c
        push    hl
        call    lba62
        ld      hl,$f0d4
        push    hl
        call    lba8d
        rst     $18
        pop     af
        ld      l,$03
        call    l8b1d
        ld      (ix-$0a),c
        ld      a,(ix-$0a)
        cp      $02
        jp      nz,l6de6
        jp      l6f56
l6d72:  sub     a
        ld      ($f510),a
        jp      l6d13
l6d79:  ld      a,($f0b6)
        ld      (ix-$07),a
l6d7f:  ld      a,(ix-$07)
        cp      $40
        jp      p,l6d13
        ld      (ix-$08),$01
        ld      hl,$f522
        push    hl
        ld      hl,$f508
        push    hl
        rst     $18
        pop     af
l6d95:  ld      hl,$f522
        push    hl
        ld      hl,$f50c
        push    hl
        call    lbab0
        jp      nc,l6ee1
        ld      hl,$f50c
        push    hl
        ld      hl,$f52e
        push    hl
        ld      hl,$f19c
        push    hl
        ld      hl,$f522
        push    hl
        rst     $18
        pop     hl
        ld      de,$f935
        rst     $38
        ld      hl,$f935
        push    hl
        push    ix
        pop     bc
        ld      hl,$fff9
        add     hl,bc
        ld      c,l
        ld      b,h
        ld      a,(bc)
        ld      ($f93f),a
        add     a,a
        sbc     a,a
        ld      ($f940),a
        ld      ($f93e),a
        ld      ($f93d),a
        ld      hl,$f93d
        push    hl
        call    lbdd4
        rst     $18
        call    lbab0
        jp      nc,l6f0e
        jp      l6ee1
l6de6:  ld      a,(ix-$09)
        or      (ix-$0a)
        ld      (ix-$09),a
        ld      hl,$f522
        push    hl
        ld      hl,$f50c
        push    hl
        call    lbad9
        jr      nz,l6e22                ; (+$26)
        ld      hl,$f522
        push    hl
        ld      hl,$f508
        push    hl
        rst     $18
        pop     af
l6e06:  ld      hl,$f19c
        push    hl
        ld      hl,$f522
        push    hl
        rst     $18
        pop     af
        ld      l,$05
        call    l8b1d
        ld      (ix-$0a),c
        ld      a,(ix-$0a)
        cp      $02
        jr      nz,l6e42                ; (+$23)
        jp      l6f56
l6e22:  ld      hl,$f522
        push    hl
        ld      a,($f0b6)
        ld      ($f937),a
        add     a,a
        sbc     a,a
        ld      ($f938),a
        ld      ($f936),a
        ld      ($f935),a
        ld      hl,$f935
        push    hl
        call    lba62
        pop     af
        jp      l6d2b
l6e42:  ld      a,(ix-$09)
        or      (ix-$0a)
        ld      (ix-$09),a
        ld      hl,$f19c
        ld      de,$f935
        rst     $38
        ld      hl,$f935
        push    hl
        ld      a,($f0d9)
        ld      c,a
        add     a,a
        sbc     a,a
        ld      b,a
        push    bc
        call    lbd0f
        ld      hl,$f19c
        push    hl
        call    lba62
        ld      hl,$f0d4
        push    hl
        call    lba8d
        ld      hl,$f198
        push    hl
        call    lbad9
        jr      z,l6ea7                 ; (+$2f)
l6e78:  ld      hl,$f19c
        push    hl
        ld      hl,$f50c
        push    hl
        ld      hl,$f508
        push    hl
        rst     $18
        rst     $18
        pop     af
        sub     a
        ld      ($f198),a
        ld      ($f199),a
        ld      ($f19a),a
        ld      ($f19b),a
        ld      l,$03
        call    l8b1d
        ld      (ix-$0a),c
        ld      a,(ix-$0a)
        cp      $02
        jp      nz,l6f79
        jp      l6f56
l6ea7:  ld      hl,$f522
        push    hl
        ld      hl,$f50c
        push    hl
        call    lbad9
        jp      z,l6d13
        ld      hl,$f522
        push    hl
        ld      a,($f0b6)
        ld      ($f937),a
        add     a,a
        sbc     a,a
        ld      ($f938),a
        ld      ($f936),a
        ld      ($f935),a
        ld      hl,$f935
        push    hl
        call    lba62
        pop     af
        jp      l6e06
l6ed5:  ld      l,(ix-$07)
        ld      a,l
        add     a,a
        ld      l,a
        ld      (ix-$07),l
        jp      l6d7f
l6ee1:  ld      a,(ix-$08)
        or      a
        jr      z,l6ed5                 ; (-$12)
        sub     a
        ld      ($f510),a
        jp      l6d13
l6eee:  ld      hl,$f522
        push    hl
        ld      a,($f0b6)
        ld      ($f937),a
        add     a,a
        sbc     a,a
        ld      ($f938),a
        ld      ($f936),a
        ld      ($f935),a
        ld      hl,$f935
        push    hl
        call    lba62
        pop     af
        jp      l6d95
l6f0e:  ld      hl,$f52e
        push    hl
        ld      hl,$f19c
        push    hl
        call    lbad9
        jr      z,l6eee                 ; (-$2d)
        ld      l,$05
        call    l8b1d
        ld      (ix-$0a),c
        ld      a,(ix-$0a)
        cp      $02
        jr      z,l6f56                 ; (+$2c)
        ld      a,(ix-$09)
        or      (ix-$0a)
        ld      (ix-$09),a
        ld      hl,$f52a
        push    hl
        ld      hl,$f198
        push    hl
        rst     $18
        pop     af
        ld      hl,$f19c
        push    hl
        ld      hl,$f52e
        push    hl
        rst     $18
        pop     af
        ld      l,$05
        call    l8b1d
        ld      (ix-$0a),c
        ld      a,(ix-$0a)
        cp      $02
        jr      nz,l6f5b                ; (+$05)
l6f56:  ld      c,$02
        jp      lbe72
l6f5b:  ld      a,(ix-$09)
        or      (ix-$0a)
        ld      (ix-$09),a
        ld      hl,$f198
        push    hl
        ld      hl,$f52a
        push    hl
        call    lbad9
        jp      z,l6eee
        ld      (ix-$08),$00
        jp      l6ee1
l6f79:  ld      a,(ix-$09)
        or      (ix-$0a)
        ld      (ix-$09),a
        ld      l,$05
        call    l8b1d
        ld      (ix-$0a),c
        ld      a,(ix-$0a)
        cp      $02
        jr      z,l6f56                 ; (-$3b)
        ld      a,(ix-$09)
        or      (ix-$0a)
        ld      (ix-$09),a
        ld      hl,$f52a
        push    hl
        ld      hl,$f198
        push    hl
        rst     $18
        pop     af
        ld      hl,$f198
        push    hl
        ld      hl,$f0d4
        push    hl
        rst     $18
        pop     af
        ld      l,$03
        call    l8b1d
        ld      (ix-$0a),c
        ld      a,(ix-$0a)
        cp      $02
        jp      z,l6f56
        ld      a,(ix-$09)
        or      (ix-$0a)
        ld      (ix-$09),a
        ld      l,$05
        call    l8b1d
        ld      (ix-$0a),c
        ld      a,(ix-$0a)
        cp      $02
        jp      z,l6f56
        ld      a,(ix-$09)
        or      (ix-$0a)
        ld      (ix-$09),a
        ld      hl,$f516
        push    hl
        ld      hl,$f0d4
        ld      de,$f935
        rst     $38
        ld      hl,$f935
        push    hl
        ld      hl,$f198
        push    hl
        call    lbe23
        ld      hl,$f52a
        push    hl
        call    lbdd4
        call    lbb03
        call    lba8d
        pop     hl
        ld      a,(hl)
        inc     hl
        or      (hl)
        inc     hl
        or      (hl)
        inc     hl
        or      (hl)
        jr      z,l7015                 ; (+$08)
        ld      a,$01
        ld      ($f510),a
        jp      l6d13
l7015:  sub     a
        ld      ($f510),a
        jp      l6d13
l701c:  rst     $30
        ld      hl,$fff7
        add     hl,sp
        ld      sp,hl
        ld      (ix-$08),$00
        ld      a,($f510)
        cp      $01
        jr      nz,l7034                ; (+$07)
        ld      a,($f0b6)
        add     a,a
        ld      c,a
        jr      l7036                   ; (+$02)
l7034:  ld      c,$40
l7036:  ld      a,c
        ld      ($f534),a
        add     a,a
        sbc     a,a
        ld      ($f535),a
        ld      ($f533),a
        ld      ($f532),a
l7045:  ld      hl,$f532
        ld      a,(hl)
        inc     hl
        or      (hl)
        inc     hl
        or      (hl)
        inc     hl
        or      (hl)
        jp      z,l70a3
        ld      hl,$f542
        push    hl
        ld      hl,$f508
        ld      de,$f935
        rst     $38
        ld      hl,$f935
        push    hl
        ld      hl,$f532
        push    hl
        call    lbe23
        rst     $18
        pop     af
        ld      hl,$f542
        push    hl
        ld      hl,$f139
        push    hl
        call    lbab0
        jp      c,l70ef
        ld      hl,$f121
        push    hl
        ld      hl,$f542
        push    hl
        call    lbab0
        jp      c,l70ef
        ld      hl,$f19c
        push    hl
        ld      hl,$f508
        push    hl
        rst     $18
        pop     af
        ld      l,$05
        call    l8b1d
        ld      (ix-$09),c
        ld      a,(ix-$09)
        cp      $02
        jp      nz,l7107
        jp      l7344
l70a3:  ld      hl,$f536
        push    hl
        ld      hl,$f50c
        ld      de,$f935
        rst     $38
        ld      hl,$f935
        push    hl
        ld      hl,$f508
        push    hl
        call    lbdf7
        rst     $18
        pop     af
        ld      hl,$f508
        push    hl
        ld      hl,$f512
        ld      de,$f935
        rst     $38
        ld      hl,$f935
        push    hl
        call    lbb03
        call    lba8d
        pop     af
        ld      hl,$f50c
        push    hl
        ld      hl,$f508
        ld      de,$f935
        rst     $38
        ld      hl,$f935
        push    hl
        ld      hl,$f536
        push    hl
        call    lba62
        rst     $18
        pop     af
        ld      c,(ix-$08)
        jp      lbe72
l70ef:  ld      hl,$f532
        push    hl
        ld      de,$f935
        rst     $38
        ld      hl,$f935
        push    hl
        ld      hl,$0001
        push    hl
        call    lbcb2
        rst     $18
        pop     af
        jp      l7045
l7107:  ld      a,(ix-$08)
        or      (ix-$09)
        ld      (ix-$08),a
        ld      hl,$f53e
        push    hl
        ld      hl,$f198
        push    hl
        rst     $18
        pop     af
        ld      hl,$f19c
        push    hl
        ld      hl,$f542
        push    hl
        rst     $18
        pop     af
        ld      a,($f510)
        cp      $01
        jr      nz,l7155                ; (+$2a)
        ld      hl,$f198
        push    hl
        ld      de,$f935
        rst     $38
        ld      hl,$f935
        push    hl
        call    lbb03
        ld      hl,$f0d4
        push    hl
        call    lba8d
        rst     $18
        pop     af
        ld      l,$03
        call    l8b1d
        ld      (ix-$09),c
        ld      a,(ix-$09)
        cp      $02
        jr      nz,l7168                ; (+$16)
        jp      l7344
l7155:  ld      l,$05
        call    l8b1d
        ld      (ix-$09),c
        ld      a,(ix-$09)
        cp      $02
        jp      nz,l71ee
        jp      l7344
l7168:  ld      a,(ix-$08)
        or      (ix-$09)
        ld      (ix-$08),a
        ld      hl,$f19c
        push    hl
        ld      hl,$f508
        push    hl
        rst     $18
        pop     af
        ld      l,$05
        call    l8b1d
        ld      (ix-$09),c
        ld      a,(ix-$09)
        cp      $02
        jp      z,l7344
        ld      a,(ix-$08)
        or      (ix-$09)
        ld      (ix-$08),a
        ld      hl,$f53e
        push    hl
        ld      hl,$f198
        push    hl
        call    lbad9
        jp      z,l70ef
        ld      hl,$f512
        push    hl
        ld      hl,$f532
        push    hl
        call    lbdd4
        pop     af
        ld      l,$0d
        call    l8b1d
        ld      (ix-$09),c
        ld      a,(ix-$09)
        cp      $02
        jp      z,l7344
        ld      a,(ix-$08)
        or      (ix-$09)
        ld      (ix-$08),a
        ld      hl,$f516
        push    hl
        ld      hl,$f347
        ld      de,$f935
        rst     $38
        ld      hl,$f935
        push    hl
        call    lbb03
        call    lba8d
        pop     hl
        ld      a,(hl)
        inc     hl
        or      (hl)
        inc     hl
        or      (hl)
        inc     hl
        or      (hl)
        jp      nz,l70ef
        sub     a
        ld      ($f510),a
        jp      l70a3
l71ee:  ld      a,(ix-$08)
        or      (ix-$09)
        ld      (ix-$08),a
        ld      hl,$f53e
        push    hl
        ld      hl,$f198
        push    hl
        call    lbad9
        jp      nz,l70ef
        ld      a,($f510)
        cp      $03
        jp      nz,l726d
        ld      hl,$f512
        push    hl
        ld      hl,$f532
        push    hl
        call    lbdd4
        pop     af
        ld      hl,$f542
        push    hl
        ld      hl,$f508
        ld      de,$f935
        rst     $38
        ld      hl,$f935
        push    hl
        ld      a,($f0b6)
        ld      ($f93f),a
        add     a,a
        sbc     a,a
        ld      ($f940),a
        ld      ($f93e),a
        ld      ($f93d),a
        ld      hl,$f93d
        push    hl
        call    lba62
        rst     $18
        pop     af
        ld      a,($f0b6)
        ld      (ix-$07),a
l7248:  ld      a,(ix-$07)
        cp      $40
        jp      p,l70ef
        ld      hl,$f19c
        push    hl
        ld      hl,$f542
        push    hl
        rst     $18
        pop     af
        ld      l,$05
        call    l8b1d
        ld      (ix-$09),c
        ld      a,(ix-$09)
        cp      $02
        jp      nz,l72c2
        jp      l7344
l726d:  ld      hl,$f198
        push    hl
        ld      de,$f935
        rst     $38
        ld      hl,$f935
        push    hl
        call    lbb03
        ld      hl,$f0d4
        push    hl
        call    lba8d
        rst     $18
        pop     af
        ld      l,$03
        call    l8b1d
        ld      (ix-$09),c
        ld      a,(ix-$09)
        cp      $02
        jp      nz,l7322
        jp      l7344
l7298:  ld      hl,$f0b6
        ld      a,(ix-$07)
        add     a,(hl)
        ld      (ix-$07),a
        ld      hl,$f542
        push    hl
        ld      a,($f0b6)
        ld      ($f937),a
        add     a,a
        sbc     a,a
        ld      ($f938),a
        ld      ($f936),a
        ld      ($f935),a
        ld      hl,$f935
        push    hl
        call    lba62
        pop     af
        jp      l7248
l72c2:  ld      a,(ix-$08)
        or      (ix-$09)
        ld      (ix-$08),a
        ld      hl,$f53e
        push    hl
        ld      hl,$f198
        push    hl
        rst     $18
        pop     af
        ld      hl,$f19c
        push    hl
        ld      hl,$f542
        ld      de,$f935
        rst     $38
        ld      hl,$f935
        push    hl
        ld      hl,$f532
        push    hl
        call    lbe23
        rst     $18
        pop     af
        ld      l,$05
        call    l8b1d
        ld      (ix-$09),c
        ld      a,(ix-$09)
        cp      $02
        jr      z,l7344                 ; (+$48)
        ld      a,(ix-$08)
        or      (ix-$09)
        ld      (ix-$08),a
        ld      hl,$f53e
        push    hl
        ld      hl,$f198
        push    hl
        call    lbad9
        jp      z,l7298
        ld      hl,$f512
        push    hl
        ld      hl,$f532
        push    hl
        call    lbe23
        pop     af
        jp      l70ef
l7322:  ld      a,(ix-$08)
        or      (ix-$09)
        ld      (ix-$08),a
        ld      hl,$f19c
        push    hl
        ld      hl,$f508
        push    hl
        rst     $18
        pop     af
        ld      l,$05
        call    l8b1d
        ld      (ix-$09),c
        ld      a,(ix-$09)
        cp      $02
        jr      nz,l7349                ; (+$05)
l7344:  ld      c,$02
        jp      lbe72
l7349:  ld      a,(ix-$08)
        or      (ix-$09)
        ld      (ix-$08),a
        ld      hl,$f53e
        push    hl
        ld      hl,$f198
        push    hl
        call    lbad9
        jp      z,l70ef
        ld      hl,$f512
        push    hl
        ld      hl,$f532
        push    hl
        call    lbdd4
        pop     af
        jp      l70ef
l736f:  rst     $30
        ld      l,$c0
        call    lba5c
        ld      a,c
        and     $ef
        ld      c,a
        ld      a,b
        and     $ff
        ld      b,a
        push    bc
        ld      l,$c0
        call    lbe62
        ld      l,$c0
        call    lba5c
        ld      a,c
        or      $10
        ld      c,a
        push    bc
        ld      l,$c0
        call    lbe62
        jp      lbe72
l7395:  rst     $20
        ld      hl,$fff9
        add     hl,sp
        ld      sp,hl
        ld      a,($f134)
        and     $04
        jr      z,l73b6                 ; (+$14)
        ld      a,(ix+$04)
        or      $40
        ld      (ix+$04),a
l73aa:  ld      l,(ix+$04)
        call    l767c
        ld      a,c
        or      a
        jr      nz,l73e5                ; (+$31)
        jr      l73aa                   ; (-$0c)
l73b6:  ld      a,($f126)
        cp      $7f
        jp      z,l7423
        ld      a,($f126)
        ld      ($f127),a
        ld      a,$7f
        ld      ($f126),a
        ld      l,(ix+$04)
        push    hl
        ld      a,($f127)
        ld      l,a
        call    l759c
        ld      (ix-$07),c
        ld      a,(ix-$07)
        cp      $02
        jp      z,l7440
        ld      c,(ix-$07)
        jp      lbe84
l73e5:  ld      l,(ix+$04)
        push    hl
        ld      a,($f126)
        ld      l,a
        call    l759c
        ld      a,c
        cp      $01
        jr      nz,l7404                ; (+$0f)
        ld      a,($f126)
        cp      $45
        jr      z,l7414                 ; (+$18)
        ld      a,($f126)
        ld      ($e969),a
        jr      l7414                   ; (+$10)
l7404:  ld      a,($f126)
        ld      ($f127),a
        ld      a,$7f
        ld      ($f126),a
        ld      c,$00
        jp      lbe84
l7414:  ld      a,$7f
        ld      ($f126),a
        ld      a,$45
        ld      ($f127),a
        ld      c,$01
        jp      lbe84
l7423:  ld      a,($f140)
        cp      $03
        jp      nz,l748c
        ld      l,(ix+$04)
        ld      a,l
        and     $80
        ld      l,a
        jr      z,l7445                 ; (+$11)
l7434:  ld      l,(ix+$04)
        call    l767c
        ld      a,c
        or      a
        jr      nz,l7464                ; (+$26)
        jr      l7434                   ; (-$0c)
l7440:  call    l736f
        jr      l7423                   ; (-$22)
l7445:  ld      a,($f134)
        and     $08
        jr      nz,l747d                ; (+$31)
        call    lac79
        ld      a,c
        cp      $02
        jr      nz,l747d                ; (+$29)
        ld      a,($f126)
        ld      ($f127),a
        ld      a,$7f
        ld      ($f126),a
        ld      c,$01
        jp      lbe84
l7464:  ld      a,($f126)
        ld      ($f127),a
        ld      a,$7f
        ld      ($f126),a
        ld      l,(ix+$04)
        push    hl
        ld      a,($f127)
        ld      l,a
        call    l759c
        jp      lbe84
l747d:  ld      hl,($f359)
        push    hl
        inc     hl
        ld      ($f359),hl
        pop     hl
        ld      a,(hl)
        ld      ($f127),a
        jr      l74a1                   ; (+$15)
l748c:  ld      l,(ix+$04)
        call    l767c
        ld      a,c
        or      a
        jr      z,l748c                 ; (-$0a)
        ld      a,($f126)
        ld      ($f127),a
        ld      a,$7f
        ld      ($f126),a
l74a1:  ld      l,(ix+$04)
        push    hl
        ld      a,($f127)
        ld      l,a
        call    l759c
        jp      lbe84
        dec     b
        dec     b
        ld      b,$06
        ld      b,$06
        ld      b,$06
        ld      b,$06
        rlca    
        rlca    
        rlca    
        rlca    
        rlca    
        rlca    
        nop     
        ld      bc,$0101
        ld      (bc),a
        ld      (bc),a
        ld      (bc),a
        ld      (bc),a
        ld      (bc),a
        ld      (bc),a
        inc     bc
        inc     b
        ex      af,af'
        add     hl,bc
        ld      a,(bc)
        dec     bc
        dec     bc
        dec     bc
        dec     bc
        dec     bc
        dec     bc
        inc     c
        ld      c,$0f
        dec     c
        djnz    l74ec                   ; (+$12)
        inc     de
        inc     d
        dec     d
        ld      d,$17
        ld      a,(de)
        ld      a,(de)
        dec     de
        dec     de
        dec     de
        dec     de
        dec     de
        jr      l7504                   ; (+$1c)
        dec     e
        ld      e,$1f
        jr      nz,l74fe                ; (+$11)
        add     hl,de
        ld      hl,l0000
        nop     
        nop     
        inc     e
        ld      (l0000),hl
        nop     
        nop     
        nop     
        nop     
        nop     
        nop     
        nop     
l74fe:  inc     hl
        inc     hl
        rlca    
        inc     b
        rlca    
        ld      (bc),a
l7504:  ld      (bc),a
        nop     
        nop     
        nop     
        nop     
        ld      (bc),a
        nop     
        rlca    
        nop     
        rlca    
        nop     
        nop     
        rlca    
        inc     b
        ld      b,$03
        inc     bc
        inc     bc
        nop     
        nop     
        rlca    
        inc     bc
        nop     
        rlca    
        rlca    
        rlca    
        inc     b
        inc     b
        rlca    
        rlca    
        rlca    
        ld      bc,l0000
        ld      bc,l0000
        ld      bc,l0000
        ld      bc,l0002
        rrca    
        ld      (bc),a
        nop     
        inc     sp
        ld      e,c
        ret     nz

        ld      b,c
        ld      e,c
        ret     nz

        ld      b,c
        ld      d,c
        ret     nz

        ld      b,c
        ld      e,a
        jr      nz,l7568                ; (+$29)
        ld      e,a
        ret     po

        add     hl,hl
        nop     
        nop     
        ld      bc,l0000
        ld      bc,$2a20
        cp      l
        nop     
        ld      e,$01
        nop     
        ccf     
        cp      l
        nop     
        daa     
        cp      l
        nop     
        nop     
        ld      bc,l0000
        ld      bc,l0000
        ld      bc,l0000
        ld      bc,$4000
        ld      bc,l0000
        ld      bc,$8040
l7568:  ld      bc,$8040
        ld      bc,l0000
        ld      bc,l0000
        ld      bc,$c041
        ld      bc,$c041
        ld      bc,$c041
        ld      bc,l0000
        ld      bc,l0000
        ld      bc,l0000
        ld      bc,l0000
        ld      bc,l0000
        ld      bc,l0000
        ld      bc,l0000
        ld      bc,$0103
        ld      (bc),a
        inc     bc
        ld      c,h
        halt    
        ld      (hl),b
        halt    
        ld      l,d
        halt    
        ld      c,b
        halt    
l759c:  rst     $20
        ld      hl,$fff4
        add     hl,sp
        ld      sp,hl
        ld      l,(ix+$04)
        ld      a,l
        and     $80
        ld      l,a
        jr      z,l75b0                 ; (+$05)
        ld      c,$00
        jp      lbe8b
l75b0:  ld      hl,$74af
        ld      a,(ix+$04)
        ld      e,a
        add     a,a
        sbc     a,a
        ld      d,a
        add     hl,de
        ld      a,(hl)
        ld      (ix-$09),a
        ld      a,(ix+$06)
        ld      c,a
        add     a,a
        sbc     a,a
        ld      b,a
        push    bc
        ld      hl,$0003
        push    hl
        call    lb9de
        pop     hl
        ld      a,l
        and     $03
        ld      e,a
        ld      (ix-$08),e
        ld      hl,$0001
        push    hl
        ld      l,$07
        ld      c,(ix+$06)
        ld      a,c
        and     $07
        ld      c,a
        ld      a,l
        sub     c
        ld      l,a
        ld      c,a
        add     a,a
        sbc     a,a
        ld      b,a
        push    bc
        call    lb9be
        pop     hl
        ld      e,l
        ld      (ix-$07),e
        ld      a,(ix-$09)
        ld      c,a
        add     a,a
        sbc     a,a
        ld      b,a
        ld      l,c
        ld      h,b
        ld      e,l
        ld      d,h
        add     hl,hl
        add     hl,de
        ld      bc,$7524
        add     hl,bc
        ld      a,(ix-$08)
        ld      e,a
        add     a,a
        sbc     a,a
        ld      d,a
        add     hl,de
        ld      a,(hl)
        ld      l,a
        and     (ix-$07)
        jr      z,l762d                 ; (+$1a)
        ld      (ix-$0c),$00
l7617:  ld      a,($f1a0)
        or      a
        jp      nz,l7676
        ld      a,(ix+$04)
        cp      $26
        jp      nz,l7676
        ld      (ix-$0c),$02
        jp      l7676
l762d:  ld      l,(ix+$06)
        bit     6,l
        jr      z,l7638                 ; (+$04)
        ld      c,$01
        jr      l763c                   ; (+$04)
l7638:  ld      a,($f140)
        ld      c,a
l763c:  ld      (ix-$0a),c
        ld      c,(ix-$0a)
        ld      hl,$7590
        jp      lb8ed
        ld      (ix-$0b),$04
l764c:  ld      hl,$7500
        ld      a,(ix-$09)
        ld      e,a
        add     a,a
        sbc     a,a
        ld      d,a
        add     hl,de
        ld      a,(hl)
        ld      l,a
        and     (ix-$0b)
        jr      z,l7662                 ; (+$04)
        ld      c,$01
        jr      l7664                   ; (+$02)
l7662:  ld      c,$02
l7664:  ld      (ix-$0c),c
        jp      l7617
        ld      (ix-$0b),$02
        jr      l764c                   ; (-$24)
        ld      (ix-$0b),$01
        jr      l764c                   ; (-$2a)
l7676:  ld      c,(ix-$0c)
        jp      lbe8b
l767c:  rst     $20
        ld      hl,$ffc7
        add     hl,sp
        ld      sp,hl
        ld      a,($f126)
        cp      $7f
        jr      z,l768e                 ; (+$05)
        ld      c,$01
        jp      lbe84
l768e:  ld      l,$00
        call    lba5c
        ld      a,c
        and     $80
        ld      c,a
        jr      nz,l76c9                ; (+$30)
        ld      a,($f140)
        ld      (ix-$08),a
        ld      a,$01
        ld      ($f140),a
        push    ix
        pop     bc
        ld      hl,$ffc7
        add     hl,bc
        call    l81ba
        ld      l,$58
        rst     $08
        ld      l,$46
        rst     $10
        call    lb8d0
l76b7:  ld      l,$00
        call    lba5c
        ld      a,c
        and     $80
        ld      c,a
        jr      nz,l76f5                ; (+$33)
        ld      l,$81
        call    lba5c
        jr      l76b7                   ; (-$12)
l76c9:  ld      l,$81
        call    lba5c
        bit     0,c
        jr      z,l7707                 ; (+$35)
        ld      l,$80
        call    lba5c
        ld      (ix-$07),c
        ld      a,(ix-$07)
        cp      $40
        jp      m,l770c
        ld      a,$43
        cp      (ix-$07)
        jp      m,l770c
        ld      l,(ix-$07)
        call    l99ab
        ld      c,$00
        jp      lbe84
l76f5:  push    ix
        pop     bc
        ld      hl,$ffc7
        add     hl,bc
        call    l8623
        ld      a,(ix-$08)
        ld      ($f140),a
        jr      l76c9                   ; (-$3e)
l7707:  ld      c,$00
        jp      lbe84
l770c:  ld      a,(ix-$07)
        cp      $1b
        jr      nz,l771a                ; (+$07)
        call    lb5c5
        ld      a,c
        or      a
        jr      nz,l7728                ; (+$0e)
l771a:  ld      a,(ix-$07)
        cp      $1a
        jr      nz,l772d                ; (+$0c)
        call    lb61f
        ld      a,c
        or      a
        jr      z,l772d                 ; (+$05)
l7728:  ld      c,$00
        jp      lbe84
l772d:  ld      l,(ix+$04)
        push    hl
        ld      l,(ix-$07)
        call    l759c
        ld      (ix-$09),c
        ld      a,(ix-$09)
        cp      $02
        jr      z,l7764                 ; (+$23)
        ld      a,($f140)
        cp      $03
        jr      nz,l776c                ; (+$24)
        ld      a,($f134)
        and     $04
        jr      nz,l776c                ; (+$1d)
        ld      a,($f0b7)
        cp      $10
        jr      nz,l776c                ; (+$16)
        ld      a,(ix-$07)
        cp      $26
        jr      z,l7764                 ; (+$07)
        ld      a,(ix-$09)
        cp      $01
        jr      nz,l776c                ; (+$08)
l7764:  call    l736f
        ld      c,$00
        jp      lbe84
l776c:  ld      a,(ix-$07)
        ld      ($f126),a
        ld      c,$01
        jp      lbe84
        nop     
        ld      hl,$6342
        ld      h,e
        inc     b
        inc     b
        dec     h
        ld      h,$0a
        ld      h,a
        ld      h,a
        ex      af,af'
        inc     h
        ld      b,h
        ld      l,c
        ld      a,(bc)
        ld      b,h
        ld      b,h
        ex      af,af'
        ld      l,c
        ld      h,l
        ld      h,h
        ld      a,(bc)
        ld      l,e
        adc     a,h
        ex      af,af'
        ld      h,h
        add     a,h
        or      d
        jp      nz,l8484
        ex      af,af'
        add     a,h
        ld      l,l
        xor     (hl)
        ld      a,(bc)
        ld      l,a
        ld      (hl),b
        ex      af,af'
        and     h
        call    nz,l0a71
        call    nz,l08c4
        ld      (hl),c
        nop     
        ld      hl,$6342
        ld      h,e
        inc     b
        dec     b
        ld      b,$21
        inc     h
        ld      h,a
        ld      h,a
        ex      af,af'
        dec     h
        ld      b,l
        ld      l,c
        inc     b
        ld      b,l
        ld      b,l
        ex      af,af'
        ld      l,c
        ld      b,$65
        inc     b
        ld      h,c
        add     a,c
        ex      af,af'
        ld      h,l
        add     a,l
        and     c
        pop     bc
        add     a,l
        add     a,l
        ex      af,af'
        add     a,l
        ld      b,$a1
        inc     b
        ld      h,a
        ld      h,a
        ex      af,af'
        and     l
        push    bc
        ld      l,c
        inc     b
        push    bc
        push    bc
        ex      af,af'
        ld      l,c
        ld      a,(bc)
        nop     
        ld      bc,$0302
        inc     b
        dec     b
        ld      b,$07
        ex      af,af'
        add     hl,bc
        ld      l,h
        ld      a,c
        inc     bc
        ld      a,d
        ld      a,c
        call    po,lbb79
        ld      a,c
        or      l
        ld      a,c
        xor     e
        ld      a,c
        add     a,l
        ld      a,c
        ld      l,(hl)
        ld      a,c
        ld      d,d
        ld      a,c
        ld      hl,$ff79
        rrca    
        rst     $38
        rst     $38
        dec     b
        inc     (hl)
        dec     (hl)
        ld      (hl),$32
        inc     sp
        call    m,l497b
        ld      a,h
        ld      a,($277c)
        ld      a,h
        dec     b
        ld      a,h
        call    c,l137b
        nop     
        ld      bc,$0302
        inc     b
        dec     b
        ld      b,$07
        ex      af,af'
        add     hl,bc
        ld      a,(bc)
        dec     bc
        inc     c
        dec     c
        ld      c,$0f
        djnz    l7834                   ; (+$11)
        ld      (de),a
        ld      d,(hl)
        ld      a,d
        scf     
        ld      a,l
        ld      (de),a
        ld      a,l
        nop     
        ld      a,l
        call    p,lab7c
        ld      a,h
        ld      (hl),e
        ld      a,h
        ld      e,b
        ld      a,h
l7834:  pop     de
        ld      a,e
        rst     $00
        ld      a,e
        xor     b
        ld      a,e
        sub     l
        ld      a,e
        ld      (hl),l
        ld      a,e
        ld      (de),a
        ld      a,e
        add     a,$7a
        ret     nz

        ld      a,d
        adc     a,d
        ld      a,d
        ld      (hl),d
        ld      a,d
        ld      e,c
        ld      a,d
        ld      c,$7a
l784c:  rst     $20
        ld      hl,$fff1
        add     hl,sp
        ld      sp,hl
        ld      (ix-$0e),$00
        ld      l,(ix+$08)
        ld      a,l
        and     $03
        add     a,$07
        ld      l,a
        ld      (ix-$0b),l
        ld      l,(ix+$08)
        bit     3,l
        jr      z,l786d                 ; (+$04)
        ld      c,$01
        jr      l786f                   ; (+$02)
l786d:  ld      c,$00
l786f:  ld      (ix-$0c),c
        ld      l,(ix+$08)
        bit     2,l
        jr      z,l787d                 ; (+$04)
        ld      c,$01
        jr      l787f                   ; (+$02)
l787d:  ld      c,$00
l787f:  ld      (ix-$0a),c
        ld      a,($f140)
        cp      $02
        jr      nz,l78a4                ; (+$1b)
        ld      l,(ix+$04)
        ld      h,(ix+$05)
        ld      bc,$f160
        ld      a,l
        sub     c
        ld      l,a
        ld      a,h
        sbc     a,b
        ld      h,a
        push    hl
        ld      hl,l0004
        push    hl
        call    lb96c
        pop     hl
        ld      (ix-$09),l
l78a4:  ld      l,$60
        rst     $10
        ld      l,$5b
        rst     $08
l78aa:  ld      l,(ix-$0b)
        call    l7395
        ld      a,c
        cp      $01
        jr      nz,l78bf                ; (+$0a)
        call    lb8e6
        ld      c,$00
        ld      a,$0a
        jp      lbe9c
l78bf:  ld      l,(ix+$06)
        call    l7d50
        ld      (ix-$0f),c
        ld      a,($f140)
        cp      $02
        jr      nz,l78f8                ; (+$29)
        ld      c,(ix-$0e)
        sub     a
        ld      b,a
        ld      l,c
        ld      h,b
        ld      e,l
        ld      d,h
        add     hl,hl
        add     hl,de
        add     hl,hl
        add     hl,de
        ld      bc,$77a8
        add     hl,bc
        ld      e,(ix-$0f)
        sub     a
        ld      d,a
        add     hl,de
        ld      a,(hl)
        ld      (ix-$07),a
        ld      l,(ix-$07)
        ld      a,l
        and     $1f
        ld      l,a
        ld      c,l
        ld      hl,$77d9
        jp      lb8ed
l78f8:  ld      c,(ix-$0e)
        sub     a
        ld      b,a
        ld      l,c
        ld      h,b
        ld      e,l
        ld      d,h
        add     hl,hl
        add     hl,de
        add     hl,hl
        add     hl,de
        ld      bc,$7777
        add     hl,bc
        ld      e,(ix-$0f)
        sub     a
        ld      d,a
        add     hl,de
        ld      a,(hl)
        ld      (ix-$07),a
        ld      l,(ix-$07)
        ld      a,l
        and     $1f
        ld      l,a
        ld      c,l
        ld      hl,$7810
        jp      lb8ed
        ld      a,(ix-$0c)
        or      a
        jr      z,l792d                 ; (+$06)
        ld      (ix-$0d),$02
        jr      l793b                   ; (+$0e)
l792d:  ld      l,$38
        rst     $10
        ld      l,(ix-$09)
        rst     $10
        ld      l,$63
        rst     $10
        ld      (ix-$0d),$01
l793b:  ld      a,($f127)
        cp      $1c
        jr      nz,l7947                ; (+$05)
        ld      a,($f127)
        ld      l,a
        rst     $10
l7947:  ld      l,$5c
        rst     $08
        ld      c,(ix-$0d)
        ld      a,$0a
        jp      lbe9c
        ld      a,($f127)
        ld      l,a
        rst     $10
l7957:  ld      c,(ix-$07)
        sub     a
        ld      b,a
        push    bc
        ld      hl,$0005
        push    hl
        call    lb9de
        pop     hl
        ld      e,l
        ld      (ix-$0e),e
        jp      l78aa
        jr      l7957                   ; (-$17)
        ld      a,(ix-$0a)
        or      a
        jr      z,l797e                 ; (+$0a)
        call    lb8e6
        ld      c,$00
        ld      a,$0a
        jp      lbe9c
l797e:  ld      a,($f127)
        ld      l,a
        rst     $10
        jr      l7957                   ; (-$2e)
        ld      a,(ix-$0a)
        or      a
        jr      nz,l7991                ; (+$06)
        ld      a,(ix-$0c)
        or      a
        jr      z,l799b                 ; (+$0a)
l7991:  call    l736f
        ld      (ix-$07),$00
        jp      l7957
l799b:  ld      l,$38
        rst     $10
        ld      l,(ix-$09)
        rst     $10
        ld      l,$63
        rst     $10
        call    lb8e6
        jp      l7957
        call    lb8e6
        ld      c,$00
        ld      a,$0a
        jp      lbe9c
        call    l736f
        jp      l7957
        ld      a,(ix-$0e)
        cp      $03
        jr      z,l79d5                 ; (+$13)
        ld      l,$63
        rst     $10
        ld      a,(ix-$0c)
        or      a
        jr      z,l79d5                 ; (+$0a)
        ld      a,($f127)
        cp      $1c
        jr      nz,l79d5                ; (+$03)
        ld      l,$5a
        rst     $08
l79d5:  ld      a,($f127)
        ld      l,a
        rst     $10
        ld      l,$5c
        rst     $08
        ld      c,$01
        ld      a,$0a
        jp      lbe9c
        ld      a,(ix-$0a)
        or      a
        jr      z,l79f4                 ; (+$0a)
        call    l736f
        ld      (ix-$07),$20
        jp      l7957
l79f4:  ld      l,$63
        rst     $10
        call    lb8e6
        jp      l7957
        ld      l,$59
        rst     $08
        jp      l7957
        ld      a,($f127)
        ld      l,a
        rst     $10
        ld      l,$63
        rst     $10
        jp      l7957
        ld      a,(ix-$0c)
        or      a
        jr      z,l7a1e                 ; (+$0a)
        ld      l,$5c
        rst     $08
        ld      c,$02
        ld      a,$0a
        jp      lbe9c
l7a1e:  ld      hl,$f33b
        push    hl
        ld      l,(ix+$04)
        ld      h,(ix+$05)
        push    hl
        rst     $18
        pop     af
        ld      l,(ix+$06)
        call    l7db1
        ld      l,(ix+$0c)
        ld      h,(ix+$0d)
        push    hl
        ld      l,(ix+$0a)
        ld      h,(ix+$0b)
        call    l7e14
        ld      a,c
        or      a
        jr      z,l7a4f                 ; (+$0a)
        ld      l,$5c
        rst     $08
        ld      c,$01
        ld      a,$0a
        jp      lbe9c
l7a4f:  ld      (ix-$07),$60
        jp      l7957
        jp      l7957
        ld      a,($f127)
        ld      l,a
        rst     $10
        ld      a,($f127)
        ld      ($f33d),a
        add     a,a
        sbc     a,a
        ld      ($f33e),a
        ld      ($f33c),a
        ld      ($f33b),a
        jp      l7957
        ld      a,(ix-$0a)
        or      a
        jr      z,l7a82                 ; (+$0a)
        call    lb8e6
        ld      c,$00
        ld      a,$0a
        jp      lbe9c
l7a82:  ld      a,($f127)
        ld      l,a
        rst     $10
        jp      l7957
        ld      a,(ix-$0a)
        or      a
        jr      nz,l7a96                ; (+$06)
        ld      a,(ix-$0c)
        or      a
        jr      z,l7aa0                 ; (+$0a)
l7a96:  call    l736f
        ld      (ix-$07),$00
        jp      l7957
l7aa0:  ld      hl,$f33b
        push    hl
        ld      l,(ix+$04)
        ld      h,(ix+$05)
        push    hl
        rst     $18
        pop     af
        ld      a,(ix-$0f)
        cp      $04
        jr      nz,l7aba                ; (+$06)
        ld      l,(ix+$06)
        call    l7db1
l7aba:  call    lb8e6
        jp      l7957
        call    l736f
        jp      l7957
        ld      l,(ix+$0c)
        ld      h,(ix+$0d)
        push    hl
        ld      l,(ix+$0a)
        ld      h,(ix+$0b)
        call    l7e14
        ld      a,c
        or      a
        jp      z,l7957
        ld      l,(ix+$04)
        ld      h,(ix+$05)
        push    hl
        ld      hl,$f33b
        push    hl
        rst     $18
        pop     af
        ld      l,$5c
        rst     $08
        ld      a,(ix-$0e)
        cp      $01
        jr      nz,l7afb                ; (+$09)
        ld      a,(ix-$0c)
        or      a
        jr      nz,l7afb                ; (+$03)
        ld      l,$63
        rst     $10
l7afb:  ld      a,(ix-$0e)
        cp      $03
        jr      nz,l7b0b                ; (+$09)
        ld      a,(ix-$0c)
        or      a
        jr      z,l7b0b                 ; (+$03)
        ld      l,$5a
        rst     $08
l7b0b:  ld      c,$01
        ld      a,$0a
        jp      lbe9c
        ld      hl,$77fa
        push    hl
        ld      hl,$f33b
        push    hl
        call    lbab0
        jr      nc,l7b2c                ; (+$0d)
        ld      hl,$0441
        push    hl
        ld      hl,$043d
        call    l7e14
        jp      l7957
l7b2c:  ld      hl,$f33b
        push    hl
        push    ix
        pop     bc
        ld      hl,$0006
        add     hl,bc
        ld      c,l
        ld      b,h
        sub     a
        ld      ($f935),a
        ld      ($f936),a
        ld      a,(bc)
        ld      ($f937),a
        sub     a
        ld      ($f938),a
        ld      hl,$f935
        push    hl
        call    lbd3e
        pop     af
        ld      hl,$f33b
        push    hl
        ld      a,($f127)
        ld      ($f937),a
        add     a,a
        sbc     a,a
        ld      ($f938),a
        ld      ($f936),a
        ld      ($f935),a
        ld      hl,$f935
        push    hl
        call    lba62
        pop     af
        ld      a,($f127)
        ld      l,a
        rst     $10
        jp      l7957
        ld      a,(ix-$0a)
        or      a
        jr      z,l7b85                 ; (+$0a)
        call    l736f
        ld      (ix-$07),$20
        jp      l7957
l7b85:  ld      a,(ix-$0f)
        cp      $04
        jr      nz,l7b8f                ; (+$03)
        ld      l,$63
        rst     $10
l7b8f:  call    lb8e6
        jp      l7957
        ld      l,$59
        rst     $08
        sub     a
        ld      ($f33b),a
        ld      ($f33c),a
        ld      ($f33d),a
        ld      ($f33e),a
        jp      l7957
        ld      hl,$f33b
        push    hl
        ld      a,($f127)
        ld      c,a
        add     a,a
        sbc     a,a
        ld      b,a
        ld      l,c
        ld      h,b
        add     hl,hl
        add     hl,hl
        ld      bc,$f160
        add     hl,bc
        push    hl
        rst     $18
        pop     af
        ld      l,(ix+$06)
        call    l7db1
        jp      l7957
        call    lb8e6
        ld      c,$00
        ld      a,$0a
        jp      lbe9c
        ld      a,($f127)
        ld      l,a
        ld      c,l
        ld      hl,$77fe
        jp      lb8ed
        ld      hl,$f33b
        push    hl
        ld      a,$00
        add     a,a
        sbc     a,a
        ld      ($f935),a
        ld      ($f936),a
        ld      a,$00
        ld      ($f938),a
        ld      a,$01
        ld      ($f937),a
        ld      hl,$f935
        push    hl
        call    lba62
        pop     af
l7bfc:  ld      l,(ix+$06)
        call    l7db1
        jp      l7957
        ld      hl,$f33b
        push    hl
        ld      a,$00
        add     a,a
        sbc     a,a
        ld      ($f935),a
        ld      ($f936),a
        ld      a,$00
        ld      ($f938),a
        ld      a,$01
        ld      ($f937),a
        ld      hl,$f935
        push    hl
        call    lbdf7
        pop     af
        jr      l7bfc                   ; (-$2b)
        ld      hl,$f33b
        push    hl
        ld      de,$f935
        rst     $38
        ld      hl,$f935
        push    hl
        call    lbb03
        rst     $18
        pop     af
        jr      l7bfc                   ; (-$3e)
        ld      hl,$f33b
        push    hl
        ld      hl,$0001
        push    hl
        call    lbcb2
        pop     af
        jp      l7bfc
        ld      hl,$f33b
        push    hl
        ld      hl,$0001
        push    hl
        call    lbd0f
        pop     af
        jp      l7bfc
        ld      a,($f127)
        ld      l,a
        rst     $10
        ld      a,($f127)
        ld      (ix-$08),a
        sub     a
        ld      ($f33f),a
        ld      ($f340),a
        ld      ($f341),a
        ld      ($f342),a
        jp      l7957
        ld      l,(ix-$08)
        call    l7dce
        ld      l,(ix+$06)
        call    l7db1
        ld      l,(ix+$0c)
        ld      h,(ix+$0d)
        push    hl
        ld      l,(ix+$0a)
        ld      h,(ix+$0b)
        call    l7e14
        ld      a,c
        or      a
        jp      z,l7957
        ld      l,$5c
        rst     $08
        ld      l,(ix+$04)
        ld      h,(ix+$05)
        push    hl
        ld      hl,$f33b
        push    hl
        rst     $18
        pop     af
        ld      c,$01
        ld      a,$0a
        jp      lbe9c
        ld      hl,$f33f
        push    hl
        push    ix
        pop     bc
        ld      hl,$0006
        add     hl,bc
        ld      c,l
        ld      b,h
        sub     a
        ld      ($f935),a
        ld      ($f936),a
        ld      a,(bc)
        ld      ($f937),a
        sub     a
        ld      ($f938),a
        ld      hl,$f935
        push    hl
        call    lbd3e
        pop     af
        ld      hl,$f33f
        push    hl
        ld      a,($f127)
        ld      ($f937),a
        add     a,a
        sbc     a,a
        ld      ($f938),a
        ld      ($f936),a
        ld      ($f935),a
        ld      hl,$f935
        push    hl
        call    lba62
        pop     af
        ld      a,($f127)
        ld      l,a
        rst     $10
        jp      l7957
        ld      l,(ix-$08)
        call    l7dce
        call    lb8e6
        jp      l7957
        ld      l,(ix-$08)
        call    l7dce
        ld      l,(ix+$06)
        call    l7db1
        call    lb8e6
        jp      l7957
        ld      hl,$f33f
        push    hl
        ld      a,($f127)
        ld      c,a
        add     a,a
        sbc     a,a
        ld      b,a
        ld      l,c
        ld      h,b
        add     hl,hl
        add     hl,hl
        ld      bc,$f160
        add     hl,bc
        push    hl
        rst     $18
        pop     af
        ld      l,(ix-$08)
        call    l7dce
        ld      l,(ix+$06)
        call    l7db1
        jp      l7957
        ld      a,($f127)
        ld      l,a
        rst     $10
        ld      a,($f127)
        ld      ($f341),a
        add     a,a
        sbc     a,a
        ld      ($f342),a
        ld      ($f340),a
        ld      ($f33f),a
        jp      l7957
l7d50:  rst     $20
        ld      a,($f127)
        cp      (ix+$04)
        jr      nc,l7d5e                ; (+$05)
        ld      c,$01
        jp      lbe84
l7d5e:  ld      a,($f127)
        cp      $10
        jp      p,l7d6b
        ld      c,$06
        jp      lbe84
l7d6b:  ld      a,($f127)
        cp      $38
        jr      nz,l7d77                ; (+$05)
        ld      c,$02
        jp      lbe84
l7d77:  ld      a,($f127)
        cp      $1d
        jr      nz,l7d83                ; (+$05)
        ld      c,$05
        jp      lbe84
l7d83:  ld      a,($f127)
        cp      $30
        jr      z,l7d91                 ; (+$07)
        ld      a,($f127)
        cp      $31
        jr      nz,l7d96                ; (+$05)
l7d91:  ld      c,$04
        jp      lbe84
l7d96:  ld      a,($f127)
        cp      $32
        jp      m,l7dac
        ld      hl,$f127
        ld      a,$36
        cp      (hl)
        jp      m,l7dac
        ld      c,$03
        jp      lbe84
l7dac:  ld      c,$00
        jp      lbe84
l7db1:  rst     $20
        ld      l,$71
        rst     $08
        ld      l,$59
        rst     $08
        ld      l,$01
        push    hl
        ld      l,(ix+$04)
        push    hl
        ld      hl,$f33b
        call    l7fc5
        ld      l,$63
        rst     $10
        ld      l,$72
        rst     $08
        jp      lbe84
l7dce:  rst     $20
        ld      a,(ix+$04)
        cp      $30
        jr      nz,l7de4                ; (+$0e)
        ld      hl,$f33b
        push    hl
        ld      hl,$f33f
        push    hl
        call    lba8d
        pop     af
        jr      l7df0                   ; (+$0c)
l7de4:  ld      hl,$f33b
        push    hl
        ld      hl,$f33f
        push    hl
        call    lbdd4
        pop     af
l7df0:  jp      lbe84
        ld      b,(hl)
        ld      b,c
        ld      d,h
        ld      b,c
        ld      c,h
        dec     l
        ld      c,(hl)
        ld      d,l
        ld      c,l
        ld      b,l
        ld      d,d
        ld      c,c
        ld      b,e
        jr      nz,l7e58                ; (+$56)
        ld      b,c
        ld      c,h
        ld      d,l
        ld      b,l
        jr      nz,l7e57                ; (+$4f)
        ld      d,l
        ld      d,h
        jr      nz,l7e5b                ; (+$4f)
        ld      b,(hl)
        jr      nz,l7e61                ; (+$52)
        ld      b,c
        ld      c,(hl)
        ld      b,a
        ld      b,l
        nop     
l7e14:  rst     $20
        ld      hl,$f33b
        push    hl
        ld      l,(ix+$04)
        ld      h,(ix+$05)
        push    hl
        call    lbab0
        jr      c,l7e3a                 ; (+$15)
        ld      l,(ix+$06)
        ld      h,(ix+$07)
        push    hl
        ld      hl,$f33b
        push    hl
        call    lbab0
        jr      c,l7e3a                 ; (+$05)
        ld      c,$01
        jp      lbe8b
l7e3a:  ld      a,($f140)
        cp      $01
        jr      nz,l7e46                ; (+$05)
        call    l736f
        jr      l7e60                   ; (+$1a)
l7e46:  ld      a,$01
        ld      ($f140),a
        ld      l,$58
        rst     $08
        ld      hl,$7df3
        rst     $28
        call    la86f
        ld      a,($f126)
l7e58:  ld      ($e969),a
l7e5b:  ld      a,$45
        ld      ($f126),a
l7e60:  ld      c,$00
        jp      lbe8b
        ld      a,(bc)
        ld      e,b
        ld      e,c
        ld      e,l
        ld      e,d
        ld      e,e
        ld      e,h
        ld      a,e
        ld      (hl),c
        ld      (hl),d
        ld      (hl),l
        and     (hl)
        ld      a,(hl)
        inc     d
        ld      a,a
        dec     c
        ld      a,a
        dec     b
        ld      a,a
        ld      a,(iy-$0a)
        ld      a,(hl)
        xor     $7e
        call    po,lcc7e
        ld      a,(hl)
        xor     h
        ld      a,(hl)
        sbc     a,a
        ld      a,(hl)
        rst     $20
        ld      hl,$fff9
        add     hl,sp
        ld      sp,hl
        ld      a,($f140)
        cp      $03
        jr      nz,l7e96                ; (+$03)
        jp      lbe84
l7e96:  ld      c,(ix+$04)
        ld      hl,$7e65
        jp      lb8ed
        sub     a
        ld      ($f576),a
        ld      ($f678),a
l7ea6:  call    l8673
        jp      lbe84
l7eac:  ld      a,($f576)
        sub     $01
        ld      ($f576),a
        ld      c,a
        sub     a
        ld      b,a
        ld      l,c
        ld      h,b
        ld      bc,$f546
        add     hl,bc
        ld      a,(hl)
        cp      $60
        jr      nz,l7eac                ; (-$16)
        ld      a,($f576)
        add     a,$01
        ld      ($f576),a
        jr      l7ea6                   ; (-$26)
l7ecc:  ld      a,($f576)
        sub     $01
        ld      ($f576),a
        ld      c,a
        sub     a
        ld      b,a
        ld      l,c
        ld      h,b
        ld      bc,$f546
        add     hl,bc
        ld      a,(hl)
        cp      $68
        jr      z,l7ea6                 ; (-$3c)
        jr      l7ecc                   ; (-$18)
        ld      a,($f576)
        sub     $01
        ld      ($f576),a
        jr      l7ea6                   ; (-$48)
        ld      a,$01
        ld      ($f678),a
        jp      l7ea6
        sub     a
        ld      ($f678),a
        jp      l7ea6
        ld      l,$c7
        call    lb54c
        jp      l7ea6
        ld      a,$01
        ld      ($f679),a
        jp      l7ea6
        sub     a
        ld      ($f679),a
        jp      l7ea6
        call    l8673
        jp      l7ea6
l7f1a:  rst     $20
        ld      a,($f140)
        cp      $03
        jr      nz,l7f25                ; (+$03)
        jp      lbe84
l7f25:  call    l817d
        ld      a,c
        or      a
        jr      z,l7f60                 ; (+$34)
        ld      a,($f576)
        ld      l,a
        ld      a,($f576)
        add     a,$01
        ld      ($f576),a
        ld      c,l
        sub     a
        ld      b,a
        ld      l,c
        ld      h,b
        ld      bc,$f546
        add     hl,bc
        push    hl
        ld      a,($f0cb)
        or      a
        jr      z,l7f53                 ; (+$0b)
        ld      a,(ix+$04)
        cp      $7d
        jr      nz,l7f53                ; (+$04)
        ld      c,$7f
        jr      l7f56                   ; (+$03)
l7f53:  ld      c,(ix+$04)
l7f56:  pop     hl
        ld      (hl),c
        call    l8673
        ld      c,$01
        jp      lbe84
l7f60:  ld      c,$00
        jp      lbe84
l7f65:  rst     $20
        ld      hl,$fff9
        add     hl,sp
        ld      sp,hl
        ld      a,($f140)
        cp      $03
        jr      nz,l7f75                ; (+$03)
        jp      lbe8b
l7f75:  ld      a,(ix+$04)
        or      a
        jp      p,l7f82
        ld      a,($f576)
        ld      c,a
        jr      l7f84                   ; (+$02)
l7f82:  ld      c,$00
l7f84:  ld      a,c
        add     a,(ix+$04)
        ld      c,a
        ld      (ix-$07),c
        ld      a,(ix-$07)
        ld      c,a
        add     a,a
        sbc     a,a
        ld      b,a
        ld      l,c
        ld      h,b
        ld      bc,$f546
        add     hl,bc
        ld      a,(hl)
        cp      (ix+$06)
        jr      z,l7fb1                 ; (+$12)
        ld      hl,$f546
        ld      a,(ix-$07)
        ld      e,a
        add     a,a
        sbc     a,a
        ld      d,a
        add     hl,de
        ld      a,(ix+$06)
        ld      (hl),a
        call    l8673
l7fb1:  jp      lbe8b
l7fb4:  rst     $30
        ld      a,($f576)
        ld      c,a
        sub     a
        ld      b,a
        ld      l,c
        ld      h,b
        ld      bc,$f545
        add     hl,bc
        ld      c,(hl)
        jp      lbe72
l7fc5:  rst     $20
        ld      hl,$fff3
        add     hl,sp
        ld      sp,hl
        ld      a,($f140)
        cp      $03
        jr      nz,l7fd5                ; (+$03)
        jp      lbe93
l7fd5:  ld      l,(ix+$06)
        push    hl
        ld      l,(ix+$04)
        ld      h,(ix+$05)
        call    la6f1
        ld      (ix-$0c),c
        ld      (ix-$0b),b
        ld      a,$20
        cp      (ix+$08)
        jr      c,l7ffc                 ; (+$0d)
        ld      a,(ix+$06)
        cp      $10
        jr      nz,l801b                ; (+$25)
        ld      (ix-$0d),$08
        jr      l802c                   ; (+$30)
l7ffc:  ld      a,(ix+$08)
        cp      $21
        jp      nz,l809d
        ld      l,$20
        ld      a,($f330)
        add     a,$03
        and     $3c
        ld      c,a
        ld      a,l
        sub     c
        ld      l,a
        ld      (ix-$09),l
        ld      (ix-$08),$03
        jp      l80a5
l801b:  ld      a,(ix+$06)
        cp      $0a
        jr      nz,l8028                ; (+$06)
        ld      (ix-$0d),$0a
        jr      l802c                   ; (+$04)
l8028:  ld      (ix-$0d),$20
l802c:  ld      l,(ix-$0d)
        ld      a,l
        sub     (ix+$08)
        ld      l,a
        ld      (ix-$09),l
        ld      (ix-$07),$00
l803b:  ld      a,(ix-$07)
        cp      (ix-$09)
        jr      nc,l8058                ; (+$15)
        ld      l,(ix-$0c)
        ld      h,(ix-$0b)
        ld      e,(ix-$07)
        sub     a
        ld      d,a
        add     hl,de
        ld      a,(hl)
        or      a
        jr      nz,l8058                ; (+$05)
        inc     (ix-$07)
        jr      l803b                   ; (-$1d)
l8058:  ld      a,(ix-$07)
        cp      (ix-$0d)
        jp      nc,l8106
        call    l817d
        ld      a,c
        or      a
        jr      z,l8097                 ; (+$2f)
        ld      a,($f576)
        ld      l,a
        ld      a,($f576)
        add     a,$01
        ld      ($f576),a
        ld      c,l
        sub     a
        ld      b,a
        ld      l,c
        ld      h,b
        ld      bc,$f546
        add     hl,bc
        push    hl
        ld      l,(ix-$07)
        push    hl
        inc     (ix-$07)
        pop     hl
        ld      c,l
        sub     a
        ld      b,a
        ld      l,c
        ld      h,b
        ld      c,(ix-$0c)
        ld      b,(ix-$0b)
        add     hl,bc
        pop     bc
        ld      a,(hl)
        ld      (bc),a
        jr      l8058                   ; (-$3f)
l8097:  call    l736f
        jp      lbe93
l809d:  ld      (ix-$09),$10
        ld      (ix-$08),$07
l80a5:  ld      a,(ix-$09)
        ld      (ix-$07),a
l80ab:  ld      a,(ix-$07)
        cp      $20
        jp      nc,l80fe
        ld      a,($f576)
        ld      l,a
        ld      a,($f576)
        add     a,$01
        ld      ($f576),a
        ld      c,l
        sub     a
        ld      b,a
        ld      l,c
        ld      h,b
        ld      bc,$f546
        add     hl,bc
        push    hl
        ld      l,(ix-$0c)
        ld      h,(ix-$0b)
        ld      e,(ix-$07)
        sub     a
        ld      d,a
        add     hl,de
        pop     bc
        ld      a,(hl)
        ld      (bc),a
        ld      l,(ix-$07)
        ld      a,l
        and     (ix-$08)
        ld      l,a
        cp      (ix-$08)
        jr      nz,l810c                ; (+$27)
        ld      a,($f576)
        ld      l,a
        ld      a,($f576)
        add     a,$01
        ld      ($f576),a
        ld      c,l
        sub     a
        ld      b,a
        ld      l,c
        ld      h,b
        ld      bc,$f546
        add     hl,bc
        ld      (hl),$63
        jr      l810c                   ; (+$0e)
l80fe:  ld      a,($f576)
        sub     $01
        ld      ($f576),a
l8106:  call    l8673
        jp      lbe93
l810c:  inc     (ix-$07)
        jp      l80ab
l8112:  rst     $20
        ld      a,($f140)
        cp      $03
        jr      nz,l811d                ; (+$03)
        jp      lbe84
l811d:  call    l817d
        ld      a,c
        or      a
        jr      nz,l812a                ; (+$06)
        call    l736f
        jp      lbe84
l812a:  ld      a,($f576)
        ld      l,a
        ld      a,($f576)
        add     a,$01
        ld      ($f576),a
        ld      c,l
        sub     a
        ld      b,a
        ld      l,c
        ld      h,b
        ld      bc,$f546
        add     hl,bc
        ld      (hl),$68
l8141:  ld      a,($f576)
        ld      l,a
        ld      a,($f576)
        add     a,$01
        ld      ($f576),a
        ld      c,l
        sub     a
        ld      b,a
        ld      l,c
        ld      h,b
        ld      bc,$f546
        add     hl,bc
        ld      c,(ix+$04)
        ld      b,(ix+$05)
        inc     (ix+$04)
        jr      nz,l8164                ; (+$03)
        inc     (ix+$05)
l8164:  ld      a,(bc)
        ld      (hl),a
        ld      a,(hl)
        or      a
        jr      z,l8177                 ; (+$0d)
        call    l817d
        ld      a,c
        or      a
        jr      nz,l8141                ; (-$30)
        call    l736f
        jp      lbe84
l8177:  call    l8673
        jp      lbe84
l817d:  rst     $30
        ld      a,($f576)
        cp      $2f
        jr      c,l81ad                 ; (+$28)
        ld      a,($f140)
        cp      $02
        jr      nz,l81b2                ; (+$26)
        ld      a,$52
        ld      ($f546),a
        ld      a,$01
        ld      ($f576),a
        sub     a
        ld      ($f678),a
        call    l8673
        call    laaca
        ld      a,($f126)
        ld      ($e969),a
        ld      a,$45
        ld      ($f126),a
        jr      l81b5                   ; (+$08)
l81ad:  ld      c,$01
        jp      lbe72
l81b2:  call    l736f
l81b5:  ld      c,$00
        jp      lbe72
l81ba:  rst     $20
        ld      hl,$fff9
        add     hl,sp
        ld      sp,hl
        ld      l,(ix+$04)
        ld      h,(ix+$05)
        inc     (ix+$04)
        jr      nz,l81ce                ; (+$03)
        inc     (ix+$05)
l81ce:  ld      a,($f576)
        ld      (hl),a
        ld      (ix-$07),$00
l81d6:  ld      hl,$f576
        ld      a,(ix-$07)
        cp      (hl)
        jr      nc,l81ff                ; (+$20)
        ld      l,(ix+$04)
        ld      h,(ix+$05)
        inc     (ix+$04)
        jr      nz,l81ed                ; (+$03)
        inc     (ix+$05)
l81ed:  push    hl
        ld      hl,$f546
        ld      e,(ix-$07)
        sub     a
l81f5:  ld      d,a
        add     hl,de
        pop     bc
        ld      a,(hl)
        ld      (bc),a
        inc     (ix-$07)
        jr      l81d6                   ; (-$29)
l81ff:  jp      lbe84
        ld      hl,$1f86
        add     a,(hl)
        dec     e
        add     a,(hl)
        dec     de
        add     a,(hl)
        add     hl,de
        add     a,(hl)
        rla     
        add     a,(hl)
        dec     d
        add     a,(hl)
        inc     de
        add     a,(hl)
        ld      de,$0f86
        add     a,(hl)
        dec     c
        add     a,(hl)
        dec     bc
        add     a,(hl)
        add     hl,bc
        add     a,(hl)
        rlca    
        add     a,(hl)
        dec     b
        add     a,(hl)
        inc     bc
        add     a,(hl)
        call    m,lf785
        add     a,l
        di      
        add     a,l
        xor     $85
        ex      (sp),hl
        add     a,l
        exx     
        add     a,l
        rst     $08
        add     a,l
        push    bc
        add     a,l
        cp      d
        add     a,l
        or      c
        add     a,l
        or      b
        add     a,l
        xor     a
        add     a,l
        xor     (hl)
        add     a,l
        xor     l
        add     a,l
        xor     h
        add     a,l
        and     h
        add     a,l
        sbc     a,e
        add     a,l
        sub     e
        add     a,l
        adc     a,e
        add     a,l
        add     a,e
        add     a,l
        ld      a,e
        add     a,l
        ld      a,d
        add     a,l
        ld      (hl),h
        add     a,l
        ld      l,(hl)
        add     a,l
        ld      l,c
        add     a,l
        ld      h,b
        add     a,l
        ld      e,a
        add     a,l
        ld      e,b
        add     a,l
        ld      d,d
        add     a,l
        ld      c,(hl)
        add     a,l
        ld      c,h
        add     a,l
        ld      c,d
        add     a,l
        ld      b,l
        add     a,l
        ld      b,c
        add     a,l
        inc     a
        add     a,l
        scf     
        add     a,l
        ld      ($2d85),a
        add     a,l
        jr      z,l81f5                 ; (-$7b)
        rla     
        add     a,l
        inc     de
        add     a,l
        ex      af,af'
        add     a,l
        add     a,iyh
        pop     af
        add     a,h
        ret     po

        add     a,h
        rst     $18
        add     a,h
        jp      c,ld584
        add     a,h
        call    nc,ld384
        add     a,h
        jp      nc,ld184
        add     a,h
        call    lcc84
        add     a,h
        xor     h
        add     a,h
        adc     a,h
        add     a,h
        ld      a,e
        add     a,h
        ld      l,l
        add     a,h
        ld      e,e
        add     a,h
        ld      d,c
        add     a,h
        ld      b,b
        add     a,h
        scf     
        add     a,h
        dec     l
        add     a,h
        ld      a,(de)
        add     a,h
        add     hl,de
        add     a,h
        inc     c
        add     a,h
        cp      $83
        call    p,lee83
        add     a,e
        ret     pe

        add     a,e
        call    po,le183
        add     a,e
        call    c,ld483
        add     a,e
        call    lc683
        add     a,e
        pop     bc
        add     a,e
        cp      c
        add     a,e
        or      c
        add     a,e
        sbc     a,h
        add     a,e
        sbc     a,e
        add     a,e
        sbc     a,d
        add     a,e
        sub     a
        add     a,e
        sub     l
        add     a,e
        sub     b
        add     a,e
        adc     a,e
        add     a,e
        adc     a,b
        add     a,e
        add     a,h
        add     a,e
        add     a,e
        add     a,e
        ld      a,(hl)
        add     a,e
        ld      a,c
        add     a,e
        ld      (hl),l
        add     a,e
        ld      l,a
        add     a,e
        ld      l,c
        add     a,e
        ld      e,a
        add     a,e
        ld      d,(hl)
        add     a,e
        ld      d,c
        add     a,e
        ld      d,b
        add     a,e
        ld      c,a
        add     a,e
        ld      c,(hl)
        add     a,e
        ld      c,l
        add     a,e
        ld      b,b
        add     a,e
        dec     a
        add     a,e
        dec     sp
        add     a,e
        ld      (hl),$83
        ld      sp,$1d83
        add     a,e
        inc     de
        add     a,e
        rrca    
        add     a,e
        ex      af,af'
        add     a,e
        inc     bc
        add     a,e
        ld      (bc),a
        add     a,e
        nop     
        ld      d,d
        ld      b,c
        ld      c,l
        jr      nz,l8308                ; (+$00)
l8308:  dec     l
        ld      c,h
        ld      c,a
        ld      c,a
        ld      d,b
        ccf     
        nop     
        ld      d,d
        ld      b,l
        ld      b,a
        nop     
        jr      nz,l8358                ; (+$43)
        ld      c,b
        ld      b,l
        ld      b,e
        ld      c,e
        ld      d,e
        ld      d,l
        ld      c,l
        nop     
        ld      c,(hl)
        ld      c,a
        jr      nz,l8371                ; (+$50)
        ld      d,d
        ld      c,a
        ld      b,a
        ld      d,d
        ld      b,c
        ld      c,l
        ld      d,e
        jr      nz,l836e                ; (+$44)
        ld      b,l
        ld      b,(hl)
        ld      c,c
        ld      c,(hl)
        ld      b,l
        ld      b,h
        nop     
        ld      c,(hl)
        ld      c,a
        ld      d,a
        jr      nz,l8336                ; (+$00)
l8336:  ld      d,a
        ld      b,c
        ld      c,c
        ld      d,h
        nop     
        dec     l
        nop     
        ld      b,b
        jr      nz,l8340                ; (+$00)
l8340:  ld      d,e
        ld      d,h
        ld      b,l
        ld      d,b
        jr      nz,l8389                ; (+$43)
        ld      c,h
        ld      b,l
        ld      b,c
        ld      d,d
        ld      b,l
        ld      b,h
        nop     
        nop     
        nop     
        nop     
        nop     
        ld      d,h
        ld      c,c
        ld      b,l
        ld      b,h
        nop     
        ld      d,h
        ld      c,c
l8358:  ld      b,l
        ld      b,h
        jr      nz,l83a8                ; (+$4c)
        ld      c,a
        ld      d,a
        nop     
        ld      d,h
        ld      c,c
        ld      b,l
        ld      b,h
        jr      nz,l83ad                ; (+$48)
        ld      c,c
        ld      b,a
        ld      c,b
        nop     
        ld      b,h
        ld      b,c
        ld      d,h
        ld      b,c
        jr      nz,l836f                ; (+$00)
l836f:  ld      b,c
        ld      b,h
l8371:  ld      b,h
        ld      d,d
        jr      nz,l8375                ; (+$00)
l8375:  ld      c,a
        ld      c,e
        jr      nz,l8379                ; (+$00)
l8379:  ld      b,d
        ld      c,c
        ld      d,h
        jr      nz,l837e                ; (+$00)
l837e:  ld      b,(hl)
        ld      b,c
        ld      c,c
        ld      c,h
        nop     
        nop     
        ld      b,l
        ld      d,d
        ld      d,d
        nop     
        ld      c,a
l8389:  ld      c,e
        nop     
        ld      b,e
        ld      d,h
        ld      c,h
        jr      nz,l8390                ; (+$00)
l8390:  ld      d,e
        ld      d,h
        ld      d,e
        jr      nz,l8395                ; (+$00)
l8395:  jr      nz,l8397                ; (+$00)
l8397:  dec     a
        jr      nz,l839a                ; (+$00)
l839a:  nop     
        nop     
        ld      c,c
        ld      c,(hl)
        ld      d,e
        ld      d,l
        ld      b,(hl)
        ld      b,(hl)
        ld      c,c
        ld      b,e
        ld      c,c
        ld      b,l
        ld      c,(hl)
        ld      d,h
l83a8:  jr      nz,l83f7                ; (+$4d)
        ld      b,l
        ld      c,l
        jr      nz,l8402                ; (+$54)
        ld      c,a
        jr      nz,l83b1                ; (+$00)
l83b1:  ld      b,c
        ld      b,d
        ld      c,a
        ld      d,d
        ld      d,h
        ld      b,l
        ld      b,h
        nop     
        ld      c,c
        ld      c,h
        ld      c,h
        ld      b,l
        ld      b,a
        ld      b,c
        ld      c,h
        nop     
        jr      nz,l8405                ; (+$42)
        ld      b,c
        ld      b,h
        nop     
        ld      b,c
        ld      b,e
        ld      d,h
        ld      c,c
        ld      d,(hl)
        ld      b,l
        nop     
        jr      nz,l83ef                ; (+$20)
        jr      nz,l83f1                ; (+$20)
        ld      c,(hl)
        ld      c,a
        nop     
        jr      nz,l83f6                ; (+$20)
        jr      nz,l841f                ; (+$47)
        ld      c,a
        ld      c,a
        ld      b,h
        nop     
        ld      b,a
        ld      c,a
        ld      c,a
        ld      b,h
        nop     
        ld      c,(hl)
        ld      c,a
        nop     
        ld      e,c
        ld      b,l
        ld      d,e
        nop     
        jr      nz,l842c                ; (+$42)
        ld      d,h
        ld      d,e
        jr      nz,l83ee                ; (+$00)
l83ee:  jr      nz,l8443                ; (+$53)
        ld      c,c
l83f1:  ld      b,a
        jr      nz,l83f4                ; (+$00)
l83f4:  ld      c,a
        ld      d,b
l83f6:  ld      b,l
l83f7:  ld      c,(hl)
        ld      b,l
        ld      b,h
        jr      nz,l8429                ; (+$2d)
        jr      nz,l83fe                ; (+$00)
l83fe:  ld      d,e
        ld      d,h
        ld      b,l
        ld      d,b
l8402:  jr      nz,l8458                ; (+$54)
        ld      c,a
l8405:  ld      c,a
        jr      nz,l8454                ; (+$4c)
        ld      c,a
        ld      c,(hl)
        ld      b,a
        nop     
        ld      c,c
        ld      d,e
        jr      nz,l8452                ; (+$42)
        ld      c,c
        ld      c,(hl)
        ld      b,c
        ld      d,d
        ld      e,c
        jr      nz,l8444                ; (+$2d)
        jr      nz,l8419                ; (+$00)
l8419:  nop     
        jr      nz,l8449                ; (+$2d)
        ld      b,c
        ld      d,h
        ld      d,h
l841f:  ld      b,l
        ld      c,l
        ld      d,b
        ld      d,h
        ld      c,c
        ld      c,(hl)
        ld      b,a
        jr      nz,l847a                ; (+$52)
        ld      b,l
l8429:  ld      d,e
        ld      b,l
        ld      d,h
l842c:  nop     
        jr      nz,l8473                ; (+$44)
        ld      b,l
        ld      c,h
        ld      b,l
        ld      d,h
        ld      b,l
        ld      b,h
        dec     l
        nop     
        jr      nz,l847c                ; (+$43)
        ld      c,h
        ld      c,a
        ld      d,e
        ld      b,l
        ld      b,h
        dec     l
        nop     
        ld      b,(hl)
        ld      c,h
        ld      d,l
l8443:  ld      c,e
l8444:  ld      b,l
        jr      nz,l8480                ; (+$39)
        jr      nc,l8479                ; (+$30)
l8449:  jr      nc,l846b                ; (+$20)
        ld      d,d
        ld      b,l
        ld      b,c
        ld      b,h
        ld      e,c
        nop     
        jr      nz,l8496                ; (+$43)
        ld      c,a
l8454:  ld      c,l
        ld      d,b
        ld      c,h
        ld      b,l
l8458:  ld      d,h
        ld      b,l
        nop     
        dec     l
        jr      nz,l84b5                ; (+$57)
        ld      d,d
        ld      c,c
        ld      d,h
        ld      b,l
        jr      nz,l84b4                ; (+$50)
        ld      d,d
        ld      c,a
        ld      d,h
        ld      b,l
        ld      b,e
        ld      d,h
        ld      b,l
l846b:  ld      b,h
        nop     
        dec     l
        jr      nz,l84be                ; (+$4e)
        ld      c,a
        jr      nz,l84b6                ; (+$43)
l8473:  ld      b,c
        ld      d,e
        ld      d,e
        ld      b,l
        ld      d,h
        ld      d,h
l8479:  ld      b,l
l847a:  nop     
        jr      nz,l84aa                ; (+$2d)
        jr      nz,l84c0                ; (+$41)
        ld      d,d
l8480:  ld      b,l
        jr      nz,l84dc                ; (+$59)
        ld      c,a
l8484:  ld      d,l
        jr      nz,l84da                ; (+$53)
        ld      d,l
        ld      d,d
        ld      b,l
        ccf     
        nop     
        ld      b,(hl)
        ld      b,c
        ld      d,h
        ld      b,c
        ld      c,h
        dec     l
        ld      c,l
        ld      b,l
        ld      c,l
        ld      c,a
l8496:  ld      d,d
        ld      e,c
        jr      nz,l84df                ; (+$45)
        ld      e,b
        ld      b,e
        ld      b,l
        ld      b,l
        ld      b,h
        ld      b,l
        ld      b,h
        jr      nz,l84e9                ; (+$46)
        ld      c,a
        ld      d,d
        jr      nz,l84f3                ; (+$4c)
        ld      b,l
        ld      b,c
        ld      d,d
l84aa:  ld      c,(hl)
        nop     
        ld      d,d
        ld      b,l
        ld      d,b
        ld      c,h
        ld      b,c
        ld      b,e
        ld      b,l
        jr      nz,l8505                ; (+$50)
l84b5:  ld      d,d
l84b6:  ld      c,a
        ld      b,d
        ld      b,l
        jr      nz,l8501                ; (+$46)
        ld      d,l
        ld      d,e
        ld      b,l
l84be:  cpl     
        ld      d,l
l84c0:  ld      c,(hl)
        ld      d,b
        ld      c,h
        ld      d,l
        ld      b,a
        jr      nz,l8517                ; (+$50)
        ld      d,d
        ld      c,a
        ld      b,d
        ld      b,l
        nop     
        nop     
        ld      d,d
        ld      b,l
        ld      b,a
        nop     
        nop     
        nop     
        nop     
        nop     
        ld      b,c
        ld      d,l
        ld      e,b
        dec     l
        nop     
l84da:  ld      b,h
        ld      d,b
l84dc:  ld      e,c
        dec     l
        nop     
l84df:  nop     
        ld      d,e
        ld      e,c
        ld      c,(hl)
        ld      b,e
        jr      nz,l8533                ; (+$4d)
        ld      c,a
        ld      b,h
        ld      b,l
l84e9:  jr      nz,l8527                ; (+$3c)
        jr      nc,l851a                ; (+$2d)
        ld      b,(hl)
        ld      a,$20
        nop     
        ld      d,a
        ld      d,d
l84f3:  ld      c,c
        ld      d,h
        ld      b,l
        jr      nz,l854c                ; (+$54)
        ld      b,c
        ld      d,b
        ld      b,l
        jr      nz,l84fd                ; (+$00)
l84fd:  ld      d,d
        ld      b,l
        ld      b,c
        ld      b,h
l8501:  jr      nz,l8557                ; (+$54)
        ld      b,c
        ld      d,b
l8505:  ld      b,l
        jr      nz,l8508                ; (+$00)
l8508:  ld      d,d
        ld      b,l
        ld      b,c
        ld      b,h
        jr      nz,l855e                ; (+$50)
        ld      d,d
        ld      c,a
        ld      b,d
        ld      b,l
        nop     
        ld      d,d
        ld      b,l
        ld      b,a
        nop     
l8517:  ld      b,l
        ld      e,b
        ld      b,l
l851a:  ld      b,e
        ld      d,l
        ld      d,h
        ld      b,l
        jr      nz,l8570                ; (+$50)
        ld      d,d
        ld      c,a
        ld      b,a
        ld      d,d
        ld      b,c
        ld      c,l
        jr      nz,l8528                ; (+$00)
l8528:  ld      b,e
        ld      d,b
        ld      c,h
        jr      nz,l852d                ; (+$00)
l852d:  ld      b,h
        ld      b,l
        ld      b,e
        jr      nz,l8532                ; (+$00)
l8532:  ld      c,c
l8533:  ld      c,(hl)
        ld      b,e
        jr      nz,l8537                ; (+$00)
l8537:  ld      d,e
        ld      c,b
        ld      d,d
        jr      nz,l853c                ; (+$00)
l853c:  ld      d,e
        ld      c,b
        ld      c,h
        jr      nz,l8541                ; (+$00)
l8541:  ld      c,a
        ld      d,d
        jr      nz,l8545                ; (+$00)
l8545:  ld      b,c
        ld      c,(hl)
        ld      b,h
        jr      nz,l854a                ; (+$00)
l854a:  dec     a
        nop     
l854c:  ld      a,$00
        ld      c,c
        ld      b,(hl)
        jr      nz,l8552                ; (+$00)
l8552:  ld      b,a
        ld      c,a
        ld      d,h
        ld      c,a
        jr      nz,l8558                ; (+$00)
l8558:  ld      c,h
        ld      b,c
        ld      b,d
        ld      b,l
        ld      c,h
        jr      nz,l855f                ; (+$00)
l855f:  nop     
        ld      d,d
        ld      d,l
        ld      c,(hl)
        jr      nz,l85ba                ; (+$55)
        ld      d,l
        ld      d,h
        jr      nz,l8569                ; (+$00)
l8569:  ld      d,e
        ld      d,h
        ld      c,a
        ld      d,b
        nop     
        ld      c,h
        ld      c,a
l8570:  ld      c,a
        ld      d,b
        jr      nz,l8574                ; (+$00)
l8574:  ld      d,d
        ld      b,l
        ld      d,b
        ld      d,h
        jr      nz,l857a                ; (+$00)
l857a:  nop     
        ld      b,h
        ld      d,h
        ld      c,a
        ld      b,a
        jr      nz,l85c1                ; (+$40)
        jr      nz,l8583                ; (+$00)
l8583:  ld      b,c
        ld      d,h
        ld      c,a
        ld      b,a
        jr      nz,l85c9                ; (+$40)
        jr      nz,l858b                ; (+$00)
l858b:  ld      d,a
        ld      b,c
        ld      c,h
        ld      c,e
        jr      nz,l85d1                ; (+$40)
        jr      nz,l8593                ; (+$00)
l8593:  ld      d,d
        ld      b,c
        ld      c,l
        ld      d,b
        jr      nz,l85d9                ; (+$40)
        jr      nz,l859b                ; (+$00)
l859b:  ld      d,a
        ld      d,d
        ld      c,c
        ld      d,h
        ld      b,l
        jr      nz,l85e2                ; (+$40)
        jr      nz,l85a4                ; (+$00)
l85a4:  ld      d,d
        ld      b,l
        ld      b,c
        ld      b,h
        jr      nz,l85ea                ; (+$40)
        jr      nz,l85ac                ; (+$00)
l85ac:  nop     
        nop     
        nop     
        nop     
        nop     
        ld      c,c
        ld      c,a
        jr      nz,l8609                ; (+$54)
        ld      b,l
        ld      d,e
        ld      d,h
        jr      nz,l85ba                ; (+$00)
l85ba:  ld      d,d
        ld      b,c
        ld      c,l
        jr      nz,l8612                ; (+$53)
        ld      c,b
        ld      c,a
l85c1:  ld      d,d
        ld      d,h
        jr      nz,l85c5                ; (+$00)
l85c5:  ld      d,d
        ld      b,c
        ld      c,l
        jr      nz,l8616                ; (+$4c)
        ld      c,a
        ld      c,(hl)
        ld      b,a
        jr      nz,l85cf                ; (+$00)
l85cf:  ld      d,d
        ld      c,a
l85d1:  ld      c,l
        jr      nz,l8628                ; (+$54)
        ld      b,l
        ld      d,e
        ld      d,h
        jr      nz,l85d9                ; (+$00)
l85d9:  ld      b,d
        ld      d,l
        ld      d,e
        jr      nz,l8632                ; (+$54)
        ld      b,l
        ld      d,e
        ld      d,h
        jr      nz,l85e3                ; (+$00)
l85e3:  ld      b,c
        ld      d,l
        ld      d,h
        ld      c,a
        jr      nz,l863d                ; (+$54)
        ld      b,l
l85ea:  ld      d,e
        ld      d,h
        jr      nz,l85ee                ; (+$00)
l85ee:  ld      d,d
        ld      c,a
        ld      c,l
        jr      nz,l85f3                ; (+$00)
l85f3:  ld      c,c
        ld      c,a
        jr      nz,l85f7                ; (+$00)
l85f7:  ld      d,d
        ld      b,c
        ld      c,l
        jr      nz,l85fc                ; (+$00)
l85fc:  ld      c,h
        ld      b,l
        ld      b,c
        ld      d,d
        ld      c,(hl)
        jr      nz,l8603                ; (+$00)
l8603:  ld      b,(hl)
        nop     
        ld      b,l
        nop     
        ld      b,h
        nop     
l8609:  ld      b,e
        nop     
        ld      b,d
        nop     
        ld      b,c
        nop     
        add     hl,sp
        nop     
        jr      c,l8613                 ; (+$00)
l8613:  scf     
        nop     
        ld      (hl),$00
        dec     (hl)
        nop     
        inc     (hl)
        nop     
        inc     sp
        nop     
        ld      ($3100),a
        nop     
        jr      nc,l8623                ; (+$00)
l8623:  rst     $20
        ld      hl,$fff9
        add     hl,sp
l8628:  ld      sp,hl
        ld      l,(ix+$04)
        ld      h,(ix+$05)
        inc     (ix+$04)
l8632:  jr      nz,l8637                ; (+$03)
        inc     (ix+$05)
l8637:  ld      a,(hl)
        ld      ($f576),a
        ld      (ix-$07),$00
l863f:  ld      hl,$f576
        ld      a,(ix-$07)
        cp      (hl)
        jr      nc,l8666                ; (+$1e)
        ld      hl,$f546
        ld      e,(ix-$07)
        sub     a
        ld      d,a
        add     hl,de
        ld      c,(ix+$04)
        ld      b,(ix+$05)
        inc     (ix+$04)
        jr      nz,l865f                ; (+$03)
        inc     (ix+$05)
l865f:  ld      a,(bc)
        ld      (hl),a
        inc     (ix-$07)
        jr      l863f                   ; (-$27)
l8666:  ld      a,($f140)
        cp      $03
        jr      z,l8670                 ; (+$03)
        call    l8673
l8670:  jp      lbe84
l8673:  rst     $30
        push    af
        push    af
        push    af
        push    af
        ld      a,($f679)
        or      a
        jr      z,l8681                 ; (+$03)
        jp      lbe72
l8681:  sub     a
        ld      ($f677),a
        ld      (ix-$07),$00
l8689:  ld      hl,$f576
        ld      a,(ix-$07)
        cp      (hl)
        jr      nc,l86d8                ; (+$46)
        ld      hl,$f546
        ld      a,(ix-$07)
        ld      e,a
        add     a,a
        sbc     a,a
        ld      d,a
        add     hl,de
        ld      a,(hl)
        ld      (ix-$08),a
        ld      a,(ix-$08)
        cp      $68
        jp      nz,l86fa
l86a9:  ld      a,($f677)
        ld      l,a
        ld      a,($f677)
        add     a,$01
        ld      ($f677),a
        ld      c,l
        sub     a
        ld      b,a
        ld      l,c
        ld      h,b
        ld      bc,$f577
        add     hl,bc
        push    hl
        inc     (ix-$07)
        ld      a,(ix-$07)
        ld      c,a
        add     a,a
        sbc     a,a
        ld      b,a
        ld      l,c
        ld      h,b
        ld      bc,$f546
        add     hl,bc
        pop     bc
        ld      a,(hl)
        ld      (bc),a
        or      a
        jp      z,l872a
        jr      l86a9                   ; (-$2f)
l86d8:  ld      a,($f678)
        cp      $01
        jp      nz,l874f
        ld      a,($f677)
        ld      l,a
        ld      a,($f677)
        add     a,$01
        ld      ($f677),a
        ld      c,l
        sub     a
        ld      b,a
        ld      l,c
        ld      h,b
        ld      bc,$f577
        add     hl,bc
        ld      (hl),$5f
        jp      l874f
l86fa:  ld      l,(ix-$08)
        ld      a,l
        and     $80
        ld      l,a
        jr      z,l8734                 ; (+$31)
        ld      a,($f677)
        ld      l,a
        ld      a,($f677)
        add     a,$01
        ld      ($f677),a
        ld      c,l
        sub     a
        ld      b,a
        ld      l,c
        ld      h,b
        ld      bc,$f577
        add     hl,bc
        ld      a,(ix-$08)
        ld      e,a
        add     a,a
        sbc     a,a
        ld      d,a
        ld      a,e
        and     $7f
        ld      e,a
        ld      a,d
        and     $ff
        ld      d,a
        ld      (hl),e
        jr      l8749                   ; (+$1f)
l872a:  ld      a,($f677)
        sub     $01
        ld      ($f677),a
        jr      l8749                   ; (+$15)
l8734:  ld      a,(ix-$08)
        ld      c,a
        add     a,a
        sbc     a,a
        ld      b,a
        ld      l,c
        ld      h,b
        add     hl,hl
        ld      bc,$8202
        add     hl,bc
        ld      a,(hl)
        inc     hl
        ld      h,(hl)
        ld      l,a
        call    l877e
l8749:  inc     (ix-$07)
        jp      l8689
l874f:  ld      hl,$f577
        ld      a,($f677)
        ld      e,a
        sub     a
        ld      d,a
        add     hl,de
        ld      (hl),$00
        ld      a,($f0cb)
        or      a
        jr      z,l8772                 ; (+$11)
        ld      a,($f0b8)
        or      a
        jr      z,l877b                 ; (+$14)
        ld      hl,$f577
        call    la63f
        call    la5e1
        jr      l877b                   ; (+$09)
l8772:  ld      l,$01
        push    hl
        ld      hl,$f577
        call    lb353
l877b:  jp      lbe72
l877e:  rst     $20
        ld      hl,$fff9
        add     hl,sp
        ld      sp,hl
        ld      (ix-$07),$00
l8788:  ld      l,(ix+$04)
        ld      h,(ix+$05)
        ld      a,(ix-$07)
        ld      e,a
        add     a,a
        sbc     a,a
        ld      d,a
        add     hl,de
        ld      a,(hl)
        or      a
        jr      z,l87c6                 ; (+$2c)
        ld      a,($f677)
        ld      l,a
        ld      a,($f677)
        add     a,$01
        ld      ($f677),a
        ld      c,l
        sub     a
        ld      b,a
        ld      l,c
        ld      h,b
        ld      bc,$f577
        add     hl,bc
        push    hl
        ld      l,(ix+$04)
        ld      h,(ix+$05)
        ld      a,(ix-$07)
        ld      e,a
        add     a,a
        sbc     a,a
        ld      d,a
        add     hl,de
        pop     bc
        ld      a,(hl)
        ld      (bc),a
        inc     (ix-$07)
        jr      l8788                   ; (-$3e)
l87c6:  jp      lbe84
l87c9:  rst     $20
        ld      hl,$fff7
        add     hl,sp
        ld      sp,hl
        ld      (ix-$07),$00
        ld      (ix-$08),$00
l87d7:  ld      hl,$f576
        ld      a,(ix-$07)
        cp      (hl)
        jr      nc,l880e                ; (+$2e)
        ld      hl,$f546
        ld      e,(ix-$07)
        sub     a
        ld      d,a
        add     hl,de
        ld      a,(hl)
        ld      (ix-$09),a
        ld      a,(ix-$09)
        cp      $40
        jp      m,l8814
        ld      a,(ix-$09)
        cp      $44
        jr      z,l8814                 ; (+$18)
        ld      a,(ix-$09)
        cp      $74
        jr      z,l8814                 ; (+$11)
        ld      l,(ix-$09)
        ld      a,l
        and     $80
        ld      l,a
        jr      z,l882c                 ; (+$20)
        jr      l8814                   ; (+$06)
l880e:  ld      c,(ix-$08)
        jp      lbe84
l8814:  ld      l,(ix-$08)
        push    hl
        inc     (ix-$08)
        pop     hl
        ld      c,l
        sub     a
        ld      b,a
        ld      l,c
        ld      h,b
        ld      c,(ix+$04)
        ld      b,(ix+$05)
        add     hl,bc
        ld      a,(ix-$09)
        ld      (hl),a
l882c:  inc     (ix-$07)
        jp      l87d7
        dec     bc
        inc     c
        dec     c
        ld      c,$03
        daa     
        ld      h,$25
        or      a
        adc     a,d
        or      h
        adc     a,d
        adc     a,h
        adc     a,d
        ld      h,e
        adc     a,d
        inc     b
        ld      h,$27
        jr      z,l886c                 ; (+$25)
        cp      l
        adc     a,d
        cp      d
        adc     a,d
        jr      c,l87d7                 ; (-$76)
        ld      (de),a
        adc     a,d
        rst     $20
        adc     a,c
l8851:  rst     $20
        ld      hl,$fff0
        add     hl,sp
        ld      sp,hl
        ld      a,($f134)
        ld      (ix-$09),a
        ld      l,$08
        call    lb136
        ld      a,($f140)
        cp      $02
        jr      nz,l8875                ; (+$0c)
        call    l9a22
l886c:  ld      a,c
        cp      $01
        jp      nz,l88e4
        jp      l894f
l8875:  ld      a,(ix+$04)
        or      a
        jr      z,l887f                 ; (+$04)
        ld      c,$01
        jr      l8881                   ; (+$02)
l887f:  ld      c,$00
l8881:  ld      a,c
        or      $02
        ld      c,a
        ld      e,a
        add     a,a
        sbc     a,a
        ld      d,a
        ld      (ix-$0c),e
        ld      (ix-$0b),d
        ld      l,(ix-$0c)
        ld      h,(ix-$0b)
        ld      bc,$8832
        add     hl,bc
        ld      a,(hl)
        ld      (ix-$0d),a
        ld      a,($f13d)
        ld      (ix-$08),a
        ld      a,$78
        ld      ($f13d),a
        ld      l,a
        push    hl
        ld      l,$ff
        call    l7f65
        ld      (ix-$0e),$02
        ld      a,($f140)
        cp      $03
        jr      nz,l88be                ; (+$04)
        ld      c,$00
        jr      l88c0                   ; (+$02)
l88be:  ld      c,$01
l88c0:  ld      a,c
        ld      ($f1a0),a
l88c4:  ld      l,(ix+$04)
        ld      c,(ix+$06)
        ld      b,(ix+$07)
        call    lb91e
        ld      (ix-$0f),c
        ld      a,(ix-$0f)
        cp      $02
        jp      z,l8966
        ld      a,(ix-$0f)
        ld      (ix-$0e),a
        jp      l8966
l88e4:  ld      l,$17
        call    l7395
        ld      l,$00
        push    hl
        ld      a,($f127)
        ld      l,a
        call    l759c
        ld      a,c
        cp      $01
        jr      z,l8911                 ; (+$19)
        ld      hl,$f127
        ld      a,$0f
        cp      (hl)
        jp      p,l8911
        ld      a,($f127)
        cp      $27
        jr      z,l892a                 ; (+$22)
        ld      a,($f127)
        cp      $26
        jr      nz,l8935                ; (+$26)
        jr      l892a                   ; (+$19)
l8911:  call    lb8e6
        ld      l,(ix-$09)
        call    lb151
        ld      a,(ix-$08)
        ld      ($f13d),a
        ld      a,$01
        ld      ($f1a0),a
        ld      c,$02
        jp      lbe93
l892a:  ld      a,($f127)
        ld      l,a
        rst     $10
        ld      a,c
        or      a
        jr      nz,l893b                ; (+$08)
        jr      l894f                   ; (+$1a)
l8935:  call    l736f
        jp      l88e4
l893b:  ld      a,($f127)
        ld      l,a
        call    la2ed
        ld      a,c
        cp      $01
        jr      z,l894f                 ; (+$08)
        ld      a,($f127)
        cp      $27
        jp      nz,l88e4
l894f:  ld      l,(ix-$09)
        call    lb151
        ld      a,(ix-$08)
        ld      ($f13d),a
        ld      a,$01
        ld      ($f1a0),a
        ld      c,(ix-$0e)
        jp      lbe93
l8966:  ld      a,(ix-$0e)
        or      a
        jr      nz,l8970                ; (+$04)
        ld      c,$66
        jr      l897d                   ; (+$0d)
l8970:  ld      a,(ix-$0e)
        cp      $01
        jr      nz,l897b                ; (+$04)
        ld      c,$69
        jr      l897d                   ; (+$02)
l897b:  ld      c,$78
l897d:  ld      (ix-$10),c
        ld      hl,$f13d
        ld      a,(ix-$10)
        cp      (hl)
        jr      z,l8996                 ; (+$0d)
        ld      a,(ix-$10)
        ld      ($f13d),a
        ld      l,a
        push    hl
        ld      l,$ff
        call    l7f65
l8996:  ld      a,($f134)
        and     $08
        jr      z,l89c8                 ; (+$2b)
        ld      a,(ix-$0c)
        and     $fd
        ld      (ix-$0c),a
        ld      a,(ix-$0b)
        and     $ff
        ld      (ix-$0b),a
        ld      l,(ix-$0c)
        ld      h,(ix-$0b)
        ld      bc,$8832
        add     hl,bc
        ld      a,(hl)
        ld      (ix-$0d),a
        ld      l,(ix-$0d)
        call    l767c
        ld      a,c
        or      a
        jr      nz,l89e1                ; (+$1c)
        jp      l88c4
l89c8:  ld      (ix-$07),$00
l89cc:  ld      l,(ix-$0d)
        call    l7395
        ld      l,$08
        call    lb136
        ld      a,($f127)
        ld      c,a
        ld      hl,$8842
        jp      lb8ed
l89e1:  ld      (ix-$07),$01
        jr      l89cc                   ; (-$1b)
        ld      a,$78
        ld      ($f13d),a
        ld      l,a
        push    hl
        ld      l,$ff
        call    l7f65
        ld      l,$7b
        rst     $08
        ld      a,(ix-$0c)
        or      $02
        ld      (ix-$0c),a
        ld      l,(ix-$0c)
        ld      h,(ix-$0b)
        ld      bc,$8832
        add     hl,bc
        ld      a,(hl)
        ld      (ix-$0d),a
        jp      l88c4
        jp      l88c4
        ld      l,$08
        call    lb11f
        ld      a,(ix-$0c)
        and     $fd
        ld      (ix-$0c),a
        ld      a,(ix-$0b)
        and     $ff
        ld      (ix-$0b),a
        ld      l,(ix-$0c)
        ld      h,(ix-$0b)
        ld      bc,$8832
        add     hl,bc
        ld      a,(hl)
        ld      (ix-$0d),a
        jp      l88c4
        ld      a,(ix-$07)
        or      a
        jp      z,l8911
        ld      l,$04
        call    lb11f
        ld      a,(ix+$04)
        or      a
        jr      z,l8a4e                 ; (+$04)
        ld      c,$10
        jr      l8a50                   ; (+$02)
l8a4e:  ld      c,$0f
l8a50:  ld      l,c
        call    l7395
        ld      l,$04
        call    lb136
        ld      a,($f127)
        ld      c,a
        ld      hl,$8836
        jp      lb8ed
        ld      l,$08
        call    lb11f
        ld      a,(ix-$0c)
        and     $fd
        ld      (ix-$0c),a
        ld      a,(ix-$0b)
        and     $ff
        ld      (ix-$0b),a
        ld      l,(ix-$0c)
        ld      h,(ix-$0b)
        ld      bc,$8832
        add     hl,bc
        ld      a,(hl)
        ld      (ix-$0d),a
        jp      l88c4
        jp      l88c4
        ld      a,$78
        ld      ($f13d),a
        ld      l,a
        push    hl
        ld      l,$ff
        call    l7f65
        ld      l,$7b
        rst     $08
        ld      a,(ix-$0c)
        or      $02
        ld      (ix-$0c),a
        ld      l,(ix-$0c)
        ld      h,(ix-$0b)
        ld      bc,$8832
        add     hl,bc
        ld      a,(hl)
        ld      (ix-$0d),a
        jp      l88c4
        jp      l894f
        jp      l8911
        jp      l894f
        jp      l8911
        nop     
        nop     
        ld      h,h
        ld      h,h
        ld      h,l
        ld      l,h
        ld      l,l
        add     a,b
        jr      nz,l8ada                ; (+$10)
        ex      af,af'
        inc     b
        ld      (bc),a
        ld      bc,$5d5c
        ld      e,e
        ld      e,e
        ld      h,a
        ld      h,a
        ld      h,a
        ld      (bc),a
        ld      (bc),a
        ld      bc,$0101
l8ada:  ld      bc,$0a01
        adc     a,e
        ld      bc,$f68b
        adc     a,d
        jp      pe,l008a
        nop     
        nop     
        nop     
        nop     
        nop     
        jr      nz,l8b32                ; (+$46)
        ld      c,a
        ld      d,d
        ld      b,e
        ld      b,l
        jr      nz,l8b3e                ; (+$4c)
        ld      c,c
        ld      c,(hl)
        ld      b,l
        nop     
        jr      nz,l8b41                ; (+$49)
        ld      c,(hl)
        ld      d,h
        ld      b,l
        ld      d,d
        ld      d,d
        ld      d,l
        ld      d,b
        ld      d,h
        nop     
        jr      nz,l8b44                ; (+$41)
        ld      b,h
        ld      b,h
        ld      d,d
        ld      b,l
        ld      d,e
        ld      d,e
        nop     
        jr      nz,l8b5c                ; (+$50)
        ld      d,a
        ld      d,d
        jr      nz,l8b63                ; (+$53)
        ld      d,l
        ld      d,b
        ld      d,b
        ld      c,h
        ld      e,c
        nop     
        ld      e,b
        ld      e,c
        ld      e,d
        ld      e,d
        ld      l,e
        ld      l,e
        ld      l,e
l8b1d:  rst     $20
        ld      hl,$fff6
        add     hl,sp
        ld      sp,hl
        ld      a,(ix+$04)
        ld      ($f67c),a
        ld      l,a
        call    l8ec3
        ld      a,c
        cp      $02
        jr      nz,l8b37                ; (+$05)
l8b32:  ld      c,$02
        jp      lbe84
l8b37:  ld      a,($f114)
        ld      c,a
        ld      a,($f332)
l8b3e:  and     c
        ld      l,a
        ld      (ix-$07),l
        ld      a,(ix-$07)
        or      a
        jr      nz,l8b4e                ; (+$05)
        ld      c,$00
        jp      lbe84
l8b4e:  ld      l,(ix-$07)
        ld      a,l
        and     $1f
        jr      z,l8b66                 ; (+$10)
        ld      l,$0c
        call    l8ec3
        ld      a,c
l8b5c:  cp      $02
        jp      nz,l8c14
        ld      c,$02
l8b63:  jp      lbe84
l8b66:  sub     a
        ld      ($f683),a
        ld      (ix-$08),$00
        ld      (ix-$09),$00
l8b72:  ld      a,(ix-$09)
        cp      $07
        jp      nc,l8c1d
        ld      hl,$8ac7
        ld      e,(ix-$09)
        sub     a
        ld      d,a
        add     hl,de
        ld      a,(hl)
        ld      ($f67a),a
        ld      a,($f114)
        ld      c,a
        ld      a,($f332)
        and     c
        ld      l,a
        ld      a,($f67a)
        ld      c,a
        and     l
        jp      z,l8c23
        ld      c,(ix-$09)
        sub     a
        ld      b,a
        ld      l,c
        ld      h,b
        add     hl,hl
        ld      bc,$8adc
        add     hl,bc
        ld      a,(hl)
        inc     hl
        ld      h,(hl)
        ld      l,a
        ld      ($f67e),hl
        ld      hl,$8ac0
        ld      e,(ix-$09)
        sub     a
        ld      d,a
        add     hl,de
        ld      a,(hl)
        ld      ($f67b),a
        ld      hl,$8ace
        ld      e,(ix-$09)
        sub     a
        ld      d,a
        add     hl,de
        ld      a,(hl)
        ld      ($f67d),a
        ld      hl,$8b16
        ld      e,(ix-$09)
        sub     a
        ld      d,a
        add     hl,de
        ld      a,(hl)
        ld      ($f680),a
        ld      a,$03
        cp      (ix-$09)
        jr      c,l8bdd                 ; (+$04)
        ld      c,$00
        jr      l8bdf                   ; (+$02)
l8bdd:  ld      c,$01
l8bdf:  ld      a,c
        ld      ($f682),a
        ld      hl,$8ad5
        ld      e,(ix-$09)
        sub     a
        ld      d,a
        add     hl,de
        ld      a,(hl)
        cp      $01
        jr      nz,l8bf6                ; (+$05)
        ld      bc,l8c39
        jr      l8bf9                   ; (+$03)
l8bf6:  ld      bc,l8dc8
l8bf9:  ld      l,c
        ld      h,b
        ld      ($f684),hl
        push    hl
        ld      hl,$8e23
        call    lb184
        ld      (ix-$0a),c
        ld      a,(ix-$0a)
        cp      $02
        jr      nz,l8c29                ; (+$1a)
        ld      c,$02
        jp      lbe84
l8c14:  ld      a,(ix-$07)
        ld      ($f332),a
        jp      l8b66
l8c1d:  ld      c,(ix-$08)
        jp      lbe84
l8c23:  inc     (ix-$09)
        jp      l8b72
l8c29:  ld      a,(ix-$08)
        or      (ix-$0a)
        ld      (ix-$08),a
        jr      l8c23                   ; (-$11)
        ld      b,d
        ld      d,h
        ld      d,e
        jr      nz,l8c39                ; (+$00)
l8c39:  rst     $20
        ld      hl,$ffc5
        add     hl,sp
        ld      sp,hl
        ld      a,($f683)
        or      a
        jr      z,l8c58                 ; (+$13)
        ld      a,($f332)
        ld      (ix-$0b),a
        ld      l,$0c
        call    l8ec3
        ld      a,c
        cp      $02
        jr      nz,l8c86                ; (+$31)
        jp      lbe84
l8c58:  ld      l,$10
        call    lb11f
        ld      a,(ix+$04)
        or      a
        jr      z,l8c92                 ; (+$2f)
        call    lb8d0
        ld      l,$71
        rst     $08
        ld      l,$58
        rst     $08
        ld      a,($f67d)
        ld      ($f681),a
        cp      $67
        jp      nz,l8cbd
        ld      a,($f67b)
        ld      l,a
        rst     $10
        ld      a,($f67d)
        ld      ($f681),a
        ld      l,a
        rst     $10
        jr      l8cc4                   ; (+$3e)
l8c86:  ld      a,(ix-$0b)
        ld      ($f332),a
        sub     a
        ld      ($f683),a
        jr      l8c58                   ; (-$3a)
l8c92:  ld      l,$7f
        rst     $10
        ld      (ix-$09),$13
        ld      (ix-$0a),$15
l8c9d:  ld      a,(ix-$09)
        ld      (ix-$08),a
        push    ix
        pop     bc
        ld      hl,$ffc5
        add     hl,bc
        call    l81ba
        ld      (ix-$07),$01
l8cb1:  ld      l,(ix-$08)
        call    l767c
        ld      a,c
        or      a
        jr      nz,l8cee                ; (+$33)
        jr      l8cb1                   ; (-$0c)
l8cbd:  ld      l,$5b
        rst     $10
        ld      hl,($f67e)
        rst     $28
l8cc4:  ld      a,($f67c)
        and     $01
        jr      z,l8cdd                 ; (+$12)
        ld      l,$63
        rst     $10
        ld      l,$76
        rst     $10
        ld      l,$04
        push    hl
        ld      l,$10
        push    hl
        ld      hl,$f19c
        call    l7fc5
l8cdd:  ld      l,$7d
        rst     $10
        ld      l,$72
        rst     $08
        ld      (ix-$09),$12
        ld      (ix-$0a),$14
        jp      l8c9d
l8cee:  ld      a,($f126)
        cp      $1b
        jr      nz,l8d2a                ; (+$35)
        ld      a,$7f
        ld      ($f126),a
        ld      l,$10
        call    lb136
        ld      a,(ix-$0a)
        ld      (ix-$08),a
        ld      l,$71
        rst     $08
        ld      l,$58
        rst     $08
        ld      a,($f67b)
        ld      l,a
        rst     $10
        ld      hl,$8c34
        rst     $28
        ld      a,($f67b)
        cp      $6c
        jr      nz,l8d53                ; (+$38)
        ld      l,$04
        push    hl
        ld      l,$10
        push    hl
        ld      hl,$e9aa
        call    l7fc5
        jp      l8d8c
l8d2a:  ld      a,($f126)
        cp      $1a
        jp      nz,l8da4
        ld      a,$7f
        ld      ($f126),a
        ld      l,$10
        call    lb11f
        ld      a,(ix-$09)
        ld      (ix-$08),a
        push    ix
        pop     bc
        ld      hl,$ffc5
        add     hl,bc
        call    l8623
        ld      (ix-$07),$01
        jp      l8cb1
l8d53:  ld      a,($f67b)
        cp      $6d
        jr      nz,l8d6b                ; (+$11)
        ld      a,($f0d8)
        add     a,a
        ld      l,a
        push    hl
        ld      l,$10
        push    hl
        ld      hl,$f0d0
        call    l7fc5
        jr      l8d8c                   ; (+$21)
l8d6b:  ld      a,($f67b)
        cp      $65
        jr      nz,l8d80                ; (+$0e)
        ld      l,$22
        push    hl
        ld      l,$02
        push    hl
        ld      hl,$f0cc
        call    l7fc5
        jr      l8d8c                   ; (+$0c)
l8d80:  ld      l,$21
        push    hl
        ld      l,$02
        push    hl
        ld      hl,$f32c
        call    l7fc5
l8d8c:  ld      a,(ix+$04)
        or      a
        jr      z,l8d96                 ; (+$04)
        ld      c,$7d
        jr      l8d98                   ; (+$02)
l8d96:  ld      c,$7f
l8d98:  ld      l,c
        rst     $10
        ld      l,$72
        rst     $08
        ld      (ix-$07),$00
        jp      l8cb1
l8da4:  ld      l,$10
        call    lb136
        ld      a,(ix-$07)
        or      a
        jr      nz,l8db9                ; (+$0a)
        push    ix
        pop     bc
        ld      hl,$ffc5
        add     hl,bc
        call    l8623
l8db9:  ld      l,$7f
        push    hl
        ld      l,$ff
        call    l7f65
        jp      lbe84
        jr      nz,l8e06                ; (+$40)
        jr      nz,l8dc8                ; (+$00)
l8dc8:  rst     $20
        ld      a,(ix+$04)
        or      a
        jr      z,l8e01                 ; (+$32)
        call    lb8d0
        ld      l,$71
        rst     $08
        ld      l,$58
        rst     $08
        ld      a,($f67d)
        ld      ($f681),a
        ld      l,a
        rst     $10
        ld      hl,($f67e)
        rst     $28
        ld      a,($f67c)
        and     $01
        jr      z,l8dfb                 ; (+$10)
        ld      hl,$8dc4
        rst     $28
        ld      l,$04
        push    hl
        ld      l,$10
        push    hl
        ld      hl,$f19c
        call    l7fc5
l8dfb:  ld      l,$7d
        rst     $10
        ld      l,$72
        rst     $08
l8e01:  ld      a,(ix+$04)
        or      a
        jr      z,l8e0c                 ; (+$05)
        ld      bc,$000a
        jr      l8e0f                   ; (+$03)
l8e0c:  ld      bc,$0090
l8e0f:  ld      l,c
        ld      h,b
        call    l767c
        ld      a,c
        or      a
        jr      z,l8e01                 ; (-$17)
        ld      l,$7f
        push    hl
        ld      l,$ff
        call    l7f65
        jp      lbe84
        rst     $30
        ld      hl,$fff9
        add     hl,sp
        ld      sp,hl
        ld      a,($f67c)
        ld      l,a
        call    l8ec3
        ld      a,c
        cp      $02
        jr      nz,l8e3a                ; (+$05)
        ld      c,$02
        jp      lbe72
l8e3a:  ld      a,$01
        ld      ($f683),a
        ld      a,($f332)
        ld      l,a
        ld      a,($f67a)
        ld      c,a
        and     l
        jr      z,l8e50                 ; (+$06)
        ld      a,($f67d)
        ld      c,a
        jr      l8e54                   ; (+$04)
l8e50:  ld      a,($f680)
        ld      c,a
l8e54:  ld      (ix-$07),c
        ld      hl,$f681
        ld      a,(ix-$07)
        cp      (hl)
        jr      z,l8e72                 ; (+$12)
        call    lb8d0
        ld      a,(ix-$07)
        ld      ($f681),a
        ld      l,a
        push    hl
        ld      a,($f682)
        ld      l,a
        call    l7f65
l8e72:  ld      hl,$f680
        ld      a,(ix-$07)
        cp      (hl)
        jr      nz,l8e7f                ; (+$04)
        ld      c,$00
        jr      l8e81                   ; (+$02)
l8e7f:  ld      c,$01
l8e81:  jp      lbe72
        inc     c
        ld      b,$01
        ld      (bc),a
        inc     bc
        ld      a,(bc)
        inc     b
        ex      af,af'
        add     hl,bc
        rlca    
        dec     c
        dec     b
        inc     c
        ld      a,l
        sub     b
        cp      e
        sub     b
        or      e
        sub     b
        or      e
        sub     b
        or      e
        sub     b
        xor     l
        sub     b
        and     a
        sub     b
        and     a
        sub     b
        ld      a,c
        sub     b
        ld      a,c
        sub     b
        ld      a,c
        sub     b
        ld      a,c
        sub     b
        ld      a,c
        sub     b
        rlca    
        add     hl,bc
        inc     b
        rlca    
        dec     c
        dec     b
        ex      af,af'
        inc     c
        ret     m

        sub     b
        pop     af
        sub     c
        sbc     a,$91
        ld      (hl),a
        sub     c
        ld      (de),a
        sub     c
        ld      (de),a
        sub     c
        sub     b
        ret     po

        sub     b
l8ec3:  rst     $20
        ld      hl,$fff1
        add     hl,sp
        ld      sp,hl
        ld      a,($f2e5)
        or      a
        jr      z,l8ed2                 ; (+$03)
        call    l9513
l8ed2:  ld      a,(ix+$04)
        cp      $01
        jr      nz,l8edd                ; (+$04)
        ld      c,$01
        jr      l8edf                   ; (+$02)
l8edd:  ld      c,$00
l8edf:  ld      a,c
        ld      ($f2e5),a
l8ee3:  ld      l,$00
        call    l92a2
        ld      a,(ix+$04)
        ld      ($f693),a
        ld      (ix-$0a),$01
        ld      l,(ix+$04)
        bit     0,l
        jr      z,l8f26                 ; (+$2d)
        ld      hl,$f129
        ld      a,($f19d)
        cp      (hl)
        jr      z,l8f48                 ; (+$46)
        ld      l,(ix-$0a)
        push    hl
        inc     (ix-$0a)
        pop     hl
        ld      a,l
        ld      c,a
        add     a,a
        sbc     a,a
        ld      b,a
        ld      l,c
        ld      h,b
        ld      bc,$f693
        add     hl,bc
        ld      a,($f19d)
        ld      ($f129),a
        ld      (hl),a
        ld      a,($f693)
        or      $80
        ld      ($f693),a
        jr      l8f48                   ; (+$22)
l8f26:  ld      l,(ix+$04)
        bit     1,l
        jp      z,l9044
        ld      l,(ix-$0a)
        push    hl
        inc     (ix-$0a)
        pop     hl
        ld      a,l
        ld      c,a
        add     a,a
        sbc     a,a
        ld      b,a
        ld      l,c
        ld      h,b
        ld      bc,$f693
        add     hl,bc
        ld      a,($f156)
        ld      (hl),a
        jp      l9044
l8f48:  ld      hl,$f128
        ld      a,($f19c)
        cp      (hl)
        jr      z,l8f73                 ; (+$22)
        ld      l,(ix-$0a)
        push    hl
        inc     (ix-$0a)
        pop     hl
        ld      a,l
        ld      c,a
        add     a,a
        sbc     a,a
        ld      b,a
        ld      l,c
        ld      h,b
        ld      bc,$f693
        add     hl,bc
        ld      a,($f19c)
        ld      ($f128),a
        ld      (hl),a
        ld      a,($f693)
        or      $40
        ld      ($f693),a
l8f73:  ld      hl,$f12b
        ld      a,($f19f)
        cp      (hl)
        jr      z,l8f9e                 ; (+$22)
        ld      l,(ix-$0a)
        push    hl
        inc     (ix-$0a)
        pop     hl
        ld      a,l
        ld      c,a
        add     a,a
        sbc     a,a
        ld      b,a
        ld      l,c
        ld      h,b
        ld      bc,$f693
        add     hl,bc
        ld      a,($f19f)
        ld      ($f12b),a
        ld      (hl),a
        ld      a,($f693)
        or      $20
        ld      ($f693),a
l8f9e:  ld      hl,$f12a
        ld      a,($f19e)
        cp      (hl)
        jr      z,l8fc9                 ; (+$22)
        ld      l,(ix-$0a)
        push    hl
        inc     (ix-$0a)
        pop     hl
        ld      a,l
        ld      c,a
        add     a,a
        sbc     a,a
        ld      b,a
        ld      l,c
        ld      h,b
        ld      bc,$f693
        add     hl,bc
        ld      a,($f19e)
        ld      ($f12a),a
        ld      (hl),a
        ld      a,($f693)
        or      $10
        ld      ($f693),a
l8fc9:  ld      l,(ix+$04)
        bit     1,l
        jp      z,l9044
        ld      a,($f0d8)
        cp      $04
        jr      nz,l8fef                ; (+$17)
        ld      l,(ix-$0a)
        push    hl
        inc     (ix-$0a)
        pop     hl
        ld      a,l
        ld      c,a
        add     a,a
        sbc     a,a
        ld      b,a
        ld      l,c
        ld      h,b
        ld      bc,$f693
        add     hl,bc
        ld      a,($f199)
        ld      (hl),a
l8fef:  ld      a,($f0d8)
        cp      $03
        jp      m,l900e
        ld      l,(ix-$0a)
        push    hl
        inc     (ix-$0a)
        pop     hl
        ld      a,l
        ld      c,a
        add     a,a
        sbc     a,a
        ld      b,a
        ld      l,c
        ld      h,b
        ld      bc,$f693
        add     hl,bc
        ld      a,($f198)
        ld      (hl),a
l900e:  ld      a,($f0d8)
        cp      $02
        jp      m,l902d
        ld      l,(ix-$0a)
        push    hl
        inc     (ix-$0a)
        pop     hl
        ld      a,l
        ld      c,a
        add     a,a
        sbc     a,a
        ld      b,a
        ld      l,c
        ld      h,b
        ld      bc,$f693
        add     hl,bc
        ld      a,($f19b)
        ld      (hl),a
l902d:  ld      l,(ix-$0a)
        push    hl
        inc     (ix-$0a)
        pop     hl
        ld      a,l
        ld      c,a
        add     a,a
        sbc     a,a
        ld      b,a
        ld      l,c
        ld      h,b
        ld      bc,$f693
        add     hl,bc
        ld      a,($f19a)
        ld      (hl),a
l9044:  ld      l,(ix-$0a)
        push    hl
        ld      hl,$f693
        call    l9385
        ld      a,c
        or      a
        jr      z,l9069                 ; (+$17)
        ld      l,$01
        call    l92a2
        ld      a,($f693)
        and     $0f
        ld      l,a
        ld      (ix-$0c),l
        ld      c,(ix-$0c)
        ld      hl,$8e84
        jp      lb8ed
l9069:  ld      l,$01
        call    l947f
        ld      a,c
        cp      $02
        jp      nz,l8ee3
        ld      c,$02
        jp      lbe84
        ld      (ix-$0b),$00
l907d:  ld      l,(ix-$0b)
        inc     l
        push    hl
        ld      hl,$f686
        call    l92be
        ld      a,c
        or      a
        jr      z,l90c7                 ; (+$3b)
        ld      hl,$f686
        ld      a,(ix-$0b)
        ld      e,a
        add     a,a
        sbc     a,a
        ld      d,a
        add     hl,de
        ld      a,(hl)
        ld      ($f332),a
        and     $40
        jr      z,l90d7                 ; (+$38)
        call    lb68f
        ld      c,$02
        jp      lbe84
        ld      (ix-$0b),$02
        jr      l907d                   ; (-$30)
        ld      (ix-$0b),$04
        jr      l907d                   ; (-$36)
        ld      a,($f0d8)
        ld      (ix-$0b),a
        jr      l907d                   ; (-$3e)
        ld      a,($f0d8)
        add     a,$08
        ld      l,a
        ld      (ix-$0b),l
        jp      l907d
l90c7:  ld      l,$01
        call    l947f
        ld      a,c
        cp      $02
        jp      nz,l8ee3
        ld      c,$02
        jp      lbe84
l90d7:  ld      c,(ix-$0c)
        ld      hl,$8eab
        jp      lb8ed
        ld      a,($f686)
        ld      ($f348),a
        ld      a,($f687)
        ld      ($f347),a
        ld      a,($f688)
        ld      ($f34a),a
        ld      a,($f689)
        ld      ($f349),a
l90f8:  ld      c,$00
        jp      lbe84
        ld      a,($f686)
        ld      ($f34a),a
        ld      a,($f687)
        ld      ($f349),a
        sub     a
        ld      ($f347),a
        ld      ($f348),a
        jr      l90f8                   ; (-$1a)
        ld      hl,$f347
        push    hl
        ld      hl,$0441
        push    hl
        rst     $18
        pop     af
        ld      a,($f0d8)
        cp      $01
        jr      nz,l912b                ; (+$08)
        ld      a,($f686)
        ld      ($f349),a
        jr      l90f8                   ; (-$33)
l912b:  ld      a,($f0d8)
        cp      $02
        jr      nz,l9140                ; (+$0e)
        ld      a,($f686)
        ld      ($f34a),a
        ld      a,($f687)
        ld      ($f349),a
        jr      l90f8                   ; (-$48)
l9140:  ld      a,($f0d8)
        cp      $03
        jr      nz,l915c                ; (+$15)
        ld      a,($f686)
        ld      ($f347),a
        ld      a,($f687)
        ld      ($f34a),a
        ld      a,($f688)
        ld      ($f349),a
        jp      l90f8
l915c:  ld      a,($f686)
        ld      ($f348),a
        ld      a,($f687)
        ld      ($f347),a
        ld      a,($f688)
        ld      ($f34a),a
        ld      a,($f689)
        ld      ($f349),a
        jp      l90f8
        ld      hl,$f198
        push    hl
        ld      hl,$0441
        push    hl
        rst     $18
        pop     af
        ld      a,($f0d8)
        cp      $01
        jr      nz,l9191                ; (+$09)
        ld      a,($f686)
        ld      ($f19a),a
        jp      l90f8
l9191:  ld      a,($f0d8)
        cp      $02
        jr      nz,l91a7                ; (+$0f)
        ld      a,($f686)
        ld      ($f19b),a
        ld      a,($f687)
        ld      ($f19a),a
        jp      l90f8
l91a7:  ld      a,($f0d8)
        cp      $03
        jr      nz,l91c3                ; (+$15)
        ld      a,($f686)
        ld      ($f198),a
        ld      a,($f687)
        ld      ($f19b),a
        ld      a,($f688)
        ld      ($f19a),a
        jp      l90f8
l91c3:  ld      a,($f686)
        ld      ($f199),a
        ld      a,($f687)
        ld      ($f198),a
        ld      a,($f688)
        ld      ($f19b),a
        ld      a,($f689)
        ld      ($f19a),a
        jp      l90f8
        ld      a,($f686)
        ld      ($f193),a
        ld      a,($f687)
        ld      ($f192),a
        sub     a
        ld      ($f190),a
        ld      ($f191),a
        ld      a,($f686)
        ld      ($e9ab),a
        ld      a,($f687)
        ld      ($e9aa),a
        ld      a,($f688)
        ld      ($e9ad),a
        ld      a,($f689)
        ld      ($e9ac),a
        ld      hl,$f0cc
        push    hl
        ld      hl,$0441
        push    hl
        rst     $18
        pop     af
        ld      a,($f68a)
        ld      ($f0cf),a
        ld      a,($f68b)
        ld      ($f0ce),a
        ld      hl,$f32c
        push    hl
        ld      hl,$0441
        push    hl
        rst     $18
        pop     af
        ld      a,($f68c)
        ld      ($f32f),a
        ld      a,($f68d)
        ld      ($f32e),a
        ld      hl,$f0d0
        push    hl
        ld      hl,$0441
        push    hl
        rst     $18
        pop     af
        ld      hl,$f68e
        ld      (ix-$0e),l
        ld      (ix-$0d),h
        ld      a,($f0d8)
        cp      $04
        jr      nz,l9261                ; (+$12)
        ld      l,(ix-$0e)
        ld      h,(ix-$0d)
        inc     (ix-$0e)
        jr      nz,l925d                ; (+$03)
        inc     (ix-$0d)
l925d:  ld      a,(hl)
        ld      ($f0d1),a
l9261:  ld      a,($f0d8)
        cp      $03
        jp      m,l927b
        ld      l,(ix-$0e)
        ld      h,(ix-$0d)
        inc     (ix-$0e)
        jr      nz,l9277                ; (+$03)
        inc     (ix-$0d)
l9277:  ld      a,(hl)
        ld      ($f0d0),a
l927b:  ld      a,($f0d8)
        cp      $02
        jp      m,l9295
        ld      l,(ix-$0e)
        ld      h,(ix-$0d)
        inc     (ix-$0e)
        jr      nz,l9291                ; (+$03)
        inc     (ix-$0d)
l9291:  ld      a,(hl)
        ld      ($f0d3),a
l9295:  ld      l,(ix-$0e)
        ld      h,(ix-$0d)
        ld      a,(hl)
        ld      ($f0d2),a
        jp      l90f8
l92a2:  rst     $20
        ld      a,$38
        out     ($c3),a
        ld      a,(ix+$04)
        or      a
        jr      nz,l92b3                ; (+$06)
        ld      a,$ff
        out     ($c2),a
        jr      l92b7                   ; (+$04)
l92b3:  ld      a,$00
        out     ($c2),a
l92b7:  ld      a,$3c
        out     ($c3),a
        jp      lbe84
l92be:  rst     $20
        ld      hl,$fff9
        add     hl,sp
        ld      sp,hl
        ld      (ix-$07),$00
l92c8:  ld      a,(ix-$07)
        cp      (ix+$06)
        jp      p,l92eb
        ld      l,(ix+$04)
        ld      h,(ix+$05)
        ld      a,(ix-$07)
        ld      e,a
        add     a,a
        sbc     a,a
        ld      d,a
        add     hl,de
        call    l92f6
        ld      a,c
        or      a
        jr      nz,l92f0                ; (+$0a)
        ld      c,$00
        jp      lbe8b
l92eb:  ld      c,$01
        jp      lbe8b
l92f0:  inc     (ix-$07)
        jp      l92c8
l92f6:  rst     $20
        push    af
        push    af
        push    af
        push    af
        ld      a,$fe
        out     ($c0),a
        ld      b,$02
l9301:  ld      (ix-$08),$00
        ld      (ix-$07),$00
l9309:  in      a,($c0)
        and     $02
        jr      z,l932b                 ; (+$1c)
        in      a,($c0)
        and     $02
        jr      z,l932b                 ; (+$16)
        ld      a,($f335)
        sub     (ix-$08)
        ld      a,($f336)
        sbc     a,(ix-$07)
        jp      nc,l9351
        djnz    l9301                   ; (-$25)
        ld      c,$00
        jp      lbe84
l932b:  ld      l,(ix+$04)
        ld      h,(ix+$05)
        in      a,($c2)
        ld      (hl),a
        ld      a,$19
        out     ($c0),a
        ld      b,$02
l933a:  ld      (ix-$08),$00
        ld      (ix-$07),$00
l9342:  in      a,($c0)
        and     $02
        jp      z,l9363
        in      a,($c0)
        and     $02
        jr      nz,l935e                ; (+$0f)
        jr      l9363                   ; (+$12)
l9351:  in      a,($81)
        inc     (ix-$08)
        jr      nz,l935b                ; (+$03)
        inc     (ix-$07)
l935b:  jp      l9309
l935e:  ld      c,$01
        jp      lbe84
l9363:  ld      a,($f335)
        sub     (ix-$08)
        ld      a,($f336)
        sbc     a,(ix-$07)
        jr      nc,l9378                ; (+$07)
        djnz    l933a                   ; (-$39)
        ld      c,$00
        jp      lbe84
l9378:  in      a,($81)
        inc     (ix-$08)
        jr      nz,l9382                ; (+$03)
        inc     (ix-$07)
l9382:  jp      l9342
l9385:  rst     $20
        ld      hl,$fff9
        add     hl,sp
        ld      sp,hl
        ld      (ix-$07),$00
l938f:  ld      a,(ix-$07)
        cp      (ix+$06)
        jp      p,l93b3
        ld      l,(ix+$04)
        ld      h,(ix+$05)
        ld      a,(ix-$07)
        ld      e,a
        add     a,a
        sbc     a,a
        ld      d,a
        add     hl,de
        ld      l,(hl)
        call    l93be
        ld      a,c
        or      a
        jr      nz,l93b8                ; (+$0a)
        ld      c,$00
        jp      lbe8b
l93b3:  ld      c,$01
        jp      lbe8b
l93b8:  inc     (ix-$07)
        jp      l938f
l93be:  rst     $20
        push    af
        push    af
        push    af
        push    af
        ld      a,(ix+$04)
        out     ($c2),a
        ld      a,$fe
        out     ($c0),a
        ld      b,$02
l93ce:  ld      (ix-$08),$00
        ld      (ix-$07),$00
l93d6:  in      a,($c0)
        and     $02
        jr      z,l93f8                 ; (+$1c)
        in      a,($c0)
        and     $02
        jr      z,l93f8                 ; (+$16)
        ld      a,($f335)
        sub     (ix-$08)
        ld      a,($f336)
        sbc     a,(ix-$07)
        jp      nc,l9415
        djnz    l93ce                   ; (-$25)
        ld      c,$00
        jp      lbe84
l93f8:  ld      a,$19
        out     ($c0),a
        ld      b,$02
l93fe:  ld      (ix-$08),$00
        ld      (ix-$07),$00
l9406:  in      a,($c0)
        and     $02
        jp      z,l9427
        in      a,($c0)
        and     $02
        jr      nz,l9422                ; (+$0f)
        jr      l9427                   ; (+$12)
l9415:  in      a,($81)
        inc     (ix-$08)
        jr      nz,l941f                ; (+$03)
        inc     (ix-$07)
l941f:  jp      l93d6
l9422:  ld      c,$01
        jp      lbe84
l9427:  ld      a,($f335)
        sub     (ix-$08)
        ld      a,($f336)
        sbc     a,(ix-$07)
        jr      nc,l943c                ; (+$07)
        djnz    l93fe                   ; (-$39)
        ld      c,$00
        jp      lbe84
l943c:  in      a,($81)
        inc     (ix-$08)
        jr      nz,l9446                ; (+$03)
        inc     (ix-$07)
l9446:  jp      l9406
        ld      a,(hl)
        sub     h
        ld      l,a
        sub     h
        ld      h,b
        sub     h
        ld      d,c
        sub     h
        ld      d,b
        ld      c,a
        ld      b,h
        jr      nz,l94a8                ; (+$52)
        ld      b,l
        ld      d,e
        ld      b,l
        ld      d,h
        jr      nz,l94a1                ; (+$45)
        ld      d,d
        ld      d,d
        jr      nz,l9460                ; (+$00)
l9460:  ld      d,l
        ld      d,l
        ld      d,h
        jr      nz,l94b5                ; (+$50)
        ld      c,a
        ld      d,a
        ld      b,l
        ld      d,d
        jr      nz,l94b1                ; (+$46)
        ld      b,c
        ld      c,c
        ld      c,h
        nop     
        ld      d,b
        ld      c,a
        ld      b,h
        jr      nz,l94c8                ; (+$54)
        ld      c,c
        ld      c,l
        ld      b,l
        ld      c,a
        ld      d,l
        ld      d,h
        jr      nz,l949c                ; (+$20)
        jr      nz,l947e                ; (+$00)
l947e:  nop     
l947f:  rst     $20
        ld      hl,$ffc9
        add     hl,sp
        ld      sp,hl
        ld      a,($f140)
        ld      (ix-$07),a
        push    ix
        pop     bc
        ld      hl,$ffc9
        add     hl,bc
        call    l81ba
        ld      a,(ix+$04)
        or      a
        jr      z,l94aa                 ; (+$0f)
        ld      a,$01
        ld      ($f140),a
        ld      l,$58
        rst     $08
        ld      hl,($944b)
        rst     $28
        ld      l,$4f
        rst     $10
l94aa:  ld      a,($f140)
        cp      $01
        jr      nz,l94d0                ; (+$1f)
l94b1:  ld      l,$00
        call    l767c
        ld      a,c
        or      a
        jr      z,l94d0                 ; (+$16)
        ld      a,($f126)
        ld      ($e969),a
        ld      a,$45
        ld      ($f126),a
        ld      a,(ix-$07)
l94c8:  ld      ($f140),a
        ld      c,$02
        jp      lbe84
l94d0:  call    l9513
        ld      a,c
        or      a
        jr      z,l94ec                 ; (+$15)
        push    ix
        pop     bc
        ld      hl,$ffc9
        add     hl,bc
        call    l8623
        ld      a,(ix-$07)
        ld      ($f140),a
        ld      c,$00
        jp      lbe84
l94ec:  ld      a,$01
        ld      ($f140),a
        ld      l,$71
        rst     $08
        ld      l,$58
        rst     $08
        ld      a,($f155)
        ld      c,a
        add     a,a
        sbc     a,a
        ld      b,a
        ld      l,c
        ld      h,b
        add     hl,hl
        ld      bc,$9449
        add     hl,bc
        ld      a,(hl)
        inc     hl
        ld      h,(hl)
        ld      l,a
        rst     $28
        ld      l,$4f
        rst     $10
        ld      l,$72
        rst     $08
        jp      l94aa
l9513:  rst     $30
        ld      hl,$fff2
        add     hl,sp
        ld      sp,hl
        sub     a
        ld      ($f128),a
        ld      ($f129),a
        ld      ($f12a),a
        ld      ($f12b),a
        ld      ($f69a),a
        ld      l,$11
        push    hl
        ld      l,$c0
        call    lbe62
        ld      (ix-$07),$00
l9535:  ld      a,(ix-$07)
        cp      $14
        jp      p,l9542
        inc     (ix-$07)
        jr      l9535                   ; (-$0d)
l9542:  ld      l,$19
        push    hl
        ld      l,$c0
        call    lbe62
        ld      l,$00
        call    l92a2
        ld      l,$ab
        call    l93be
        ld      a,c
        or      a
        jp      z,l994e
        ld      l,$01
        call    l92a2
        sub     a
        ld      ($f15d),a
        ld      (ix-$09),$00
        ld      l,$06
        push    hl
        ld      hl,$f69b
        call    l92be
        ld      a,c
        or      a
        jp      z,l994e
        ld      (ix-$07),$00
l9578:  ld      a,(ix-$07)
        cp      $06
        jp      p,l95a5
        ld      hl,$f69b
        ld      a,(ix-$07)
        ld      e,a
        add     a,a
        sbc     a,a
        ld      d,a
        add     hl,de
        ld      a,(hl)
        ld      (ix-$0e),a
        ld      a,($f69a)
        add     a,(ix-$0e)
        ld      ($f69a),a
        ld      a,(ix-$0e)
        cp      $20
        jr      nz,l95bb                ; (+$1c)
        ld      (ix-$0e),$00
        jr      l95bb                   ; (+$16)
l95a5:  push    ix
        pop     bc
        ld      hl,$fff2
        add     hl,bc
        call    l92f6
        ld      a,c
        or      a
        jr      nz,l95e1                ; (+$2e)
        jp      l994e
l95b6:  inc     (ix-$07)
        jr      l9578                   ; (-$43)
l95bb:  ld      hl,$f157
        ld      a,(ix-$07)
        ld      e,a
        add     a,a
        sbc     a,a
        ld      d,a
        add     hl,de
        ld      a,(hl)
        cp      (ix-$0e)
        jr      z,l95b6                 ; (-$16)
        ld      hl,$f157
        ld      a,(ix-$07)
        ld      e,a
        add     a,a
        sbc     a,a
        ld      d,a
        add     hl,de
        ld      a,(ix-$0e)
        ld      (hl),a
        ld      (ix-$09),$01
        jr      l95b6                   ; (-$2b)
l95e1:  ld      a,($f69a)
        add     a,(ix-$0e)
        ld      ($f69a),a
        ld      c,(ix-$0e)
        sub     a
        ld      b,a
        push    bc
        ld      hl,$0005
        push    hl
        call    lb9de
        pop     hl
        ld      e,l
        ld      a,e
        ld      ($f0b6),a
        or      a
        jr      nz,l9605                ; (+$05)
        ld      a,$20
        ld      ($f0b6),a
l9605:  ld      l,(ix-$0e)
        ld      a,l
        and     $1f
        ld      l,a
        ld      a,l
        ld      ($f0d9),a
        or      a
        jr      nz,l9618                ; (+$05)
        ld      a,$20
        ld      ($f0d9),a
l9618:  ld      a,($f0d9)
        add     a,$ff
        ld      l,a
        ld      (ix-$0e),l
        ld      c,(ix-$0e)
        sub     a
        ld      b,a
        push    bc
        ld      hl,$0003
        push    hl
        call    lb9de
        pop     hl
        ld      e,l
        inc     e
        ld      a,e
        ld      ($f0d8),a
        ld      hl,$f0d4
        push    hl
        ld      c,(ix-$0e)
        sub     a
        ld      b,a
        ld      l,c
        ld      h,b
        add     hl,hl
        add     hl,hl
        ld      bc,$03bd
        add     hl,bc
        push    hl
        rst     $18
        pop     af
        ld      hl,$f13f
        call    l92f6
        ld      a,c
        or      a
        jp      z,l994e
        ld      hl,$f13f
        ld      a,($f69a)
        add     a,(hl)
        ld      ($f69a),a
        ld      (ix-$07),$00
        ld      hl,$e96a
        ld      (ix-$0c),l
        ld      (ix-$0b),h
l966b:  ld      hl,$f13f
        ld      a,(ix-$07)
        cp      (hl)
        jp      p,l9685
        ld      l,$08
        push    hl
        ld      hl,$f69b
        call    l92be
        ld      a,c
        or      a
        jr      nz,l9696                ; (+$14)
        jp      l994e
l9685:  ld      l,$04
        push    hl
        ld      hl,$f69b
        call    l92be
        ld      a,c
        or      a
        jp      nz,l971f
        jp      l994e
l9696:  ld      l,$08
        push    hl
        ld      hl,$f69b
        call    l9966
        ld      l,(ix-$0c)
        ld      h,(ix-$0b)
        inc     hl
        ld      a,($f69b)
        ld      (hl),a
        ld      l,(ix-$0c)
        ld      h,(ix-$0b)
        ld      a,($f69c)
        ld      (hl),a
        ld      l,(ix-$0c)
        ld      h,(ix-$0b)
        inc     hl
        inc     hl
        inc     hl
        ld      a,($f69d)
        ld      (hl),a
        ld      l,(ix-$0c)
        ld      h,(ix-$0b)
        inc     hl
        inc     hl
        ld      a,($f69e)
        ld      (hl),a
        ld      l,(ix-$0c)
        ld      h,(ix-$0b)
        ld      bc,$0005
        add     hl,bc
        ld      a,($f69f)
        ld      (hl),a
        ld      l,(ix-$0c)
        ld      h,(ix-$0b)
        inc     hl
        inc     hl
        inc     hl
        inc     hl
        ld      a,($f6a0)
        ld      (hl),a
        ld      l,(ix-$0c)
        ld      h,(ix-$0b)
        ld      bc,$0007
        add     hl,bc
        ld      a,($f6a1)
        ld      (hl),a
        ld      l,(ix-$0c)
        ld      h,(ix-$0b)
        ld      bc,$0006
        add     hl,bc
        ld      a,($f6a2)
        ld      (hl),a
        inc     (ix-$07)
        ld      l,(ix-$0c)
        ld      h,(ix-$0b)
        ld      a,l
        add     a,$08
        ld      l,a
        ld      a,h
        adc     a,$00
        ld      h,a
        ld      (ix-$0c),l
        ld      (ix-$0b),h
        jp      l966b
l971f:  ld      l,$04
        push    hl
        ld      hl,$f69b
        call    l9966
        ld      a,(ix-$09)
        or      a
        jr      z,l9746                 ; (+$18)
        ld      a,($f69b)
        ld      ($f0c2),a
        ld      a,($f69c)
        ld      ($f0c1),a
        ld      a,($f69d)
        ld      ($f0c4),a
        ld      a,($f69e)
        ld      ($f0c3),a
l9746:  ld      l,$04
        push    hl
        ld      hl,$f69b
        call    l92be
        ld      a,c
        or      a
        jp      z,l994e
        ld      l,$04
        push    hl
        ld      hl,$f69b
        call    l9966
        ld      a,(ix-$09)
        or      a
        jr      z,l977b                 ; (+$18)
        ld      a,($f69b)
        ld      ($f2e2),a
        ld      a,($f69c)
        ld      ($f2e1),a
        ld      a,($f69d)
        ld      ($f2e4),a
        ld      a,($f69e)
        ld      ($f2e3),a
l977b:  ld      l,$02
        push    hl
        ld      hl,$f69b
        call    l92be
        ld      a,c
        or      a
        jp      z,l994e
        ld      l,$02
        push    hl
        ld      hl,$f69b
        call    l9966
        ld      hl,$f330
        call    l92f6
        ld      a,c
        or      a
        jp      z,l994e
        ld      hl,$f330
        ld      a,($f69a)
        add     a,(hl)
        ld      ($f69a),a
        ld      hl,$f0da
        call    l92f6
        ld      a,c
        or      a
        jp      z,l994e
        ld      hl,$f0da
        ld      a,($f69a)
        add     a,(hl)
        ld      ($f69a),a
        ld      a,($f0da)
        ld      (ix-$0e),a
        ld      (ix-$07),$00
l97c6:  ld      a,(ix-$07)
        cp      $08
        jp      p,l97f5
        ld      l,(ix-$0e)
        bit     0,l
        jr      z,l9807                 ; (+$32)
        ld      l,$06
        push    hl
        ld      a,(ix-$07)
        ld      c,a
        add     a,a
        sbc     a,a
        ld      b,a
        ld      l,c
        ld      h,b
        ld      e,l
        ld      d,h
        add     hl,hl
        add     hl,de
        add     hl,hl
        add     hl,de
        ld      bc,$f0db
        add     hl,bc
        call    l92be
        ld      a,c
        or      a
        jr      nz,l9814                ; (+$22)
        jp      l994e
l97f5:  push    ix
        pop     bc
        ld      hl,$fff2
        add     hl,bc
        call    l92f6
        ld      a,c
        or      a
        jp      nz,l987e
        jp      l994e
l9807:  ld      a,(ix-$0e)
        or      a
        rra     
        ld      (ix-$0e),a
        inc     (ix-$07)
        jr      l97c6                   ; (-$4e)
l9814:  ld      l,$06
        push    hl
        ld      a,(ix-$07)
        ld      c,a
        add     a,a
        sbc     a,a
        ld      b,a
        ld      l,c
        ld      h,b
        ld      e,l
        ld      d,h
        add     hl,hl
        add     hl,de
        add     hl,hl
        add     hl,de
        ld      bc,$f0db
        add     hl,bc
        call    l9966
        ld      (ix-$08),$05
l9831:  ld      a,(ix-$08)
        or      a
        jr      z,l9857                 ; (+$20)
        ld      a,(ix-$07)
        ld      c,a
        add     a,a
        sbc     a,a
        ld      b,a
        ld      l,c
        ld      h,b
        ld      e,l
        ld      d,h
        add     hl,hl
        add     hl,de
        add     hl,hl
        add     hl,de
        ld      bc,$f0db
        add     hl,bc
        ld      a,(ix-$08)
        ld      e,a
        add     a,a
        sbc     a,a
        ld      d,a
        add     hl,de
        ld      a,(hl)
        cp      $20
        jr      z,l9879                 ; (+$22)
l9857:  ld      a,(ix-$07)
        ld      c,a
        add     a,a
        sbc     a,a
        ld      b,a
        ld      l,c
        ld      h,b
        ld      e,l
        ld      d,h
        add     hl,hl
        add     hl,de
        add     hl,hl
        add     hl,de
        ld      bc,$f0db
        add     hl,bc
        ld      c,(ix-$08)
        inc     c
        ld      a,c
        ld      e,a
        add     a,a
        sbc     a,a
        ld      d,a
        add     hl,de
        ld      (hl),$00
        jp      l9807
l9879:  dec     (ix-$08)
        jr      l9831                   ; (-$4d)
l987e:  ld      a,($f69a)
        add     a,(ix-$0e)
        ld      ($f69a),a
        push    ix
        pop     bc
        ld      hl,$fff2
        add     hl,bc
        call    l92f6
        ld      a,c
        or      a
        jp      z,l994e
        ld      l,(ix-$0e)
        bit     6,l
        jr      z,l98a1                 ; (+$04)
        ld      c,$01
        jr      l98a3                   ; (+$02)
l98a1:  ld      c,$00
l98a3:  ld      (ix-$0d),c
        ld      a,($f69a)
        or      a
        jr      z,l98b6                 ; (+$0a)
        ld      a,$03
        ld      ($f155),a
        ld      c,$00
        jp      lbe72
l98b6:  ld      a,(ix-$09)
        or      a
        jr      z,l98d2                 ; (+$16)
        ld      a,($f0da)
        ld      ($f113),a
        ld      a,$0f
        ld      ($f15e),a
        ld      a,$02
        ld      ($f331),a
        ld      l,a
        call    l99ab
        jr      l98ea                   ; (+$18)
l98d2:  ld      a,($f15e)
        cp      $0f
        jr      z,l98ea                 ; (+$11)
        ld      l,$00
        call    l92a2
        ld      l,$02
        call    l93be
        ld      a,c
        or      a
        jr      nz,l9907                ; (+$20)
        jp      l994e
l98ea:  ld      a,(ix-$0d)
        or      a
        jr      nz,l9927                ; (+$37)
        ld      a,($f113)
        or      a
        jr      z,l9927                 ; (+$31)
        ld      l,$00
        call    l92a2
        ld      l,$06
        call    l93be
        ld      a,c
        or      a
        jr      nz,l9930                ; (+$2c)
        jp      l994e
l9907:  ld      a,($f15e)
        ld      l,a
        call    l93be
        ld      a,c
        or      a
        jr      z,l994e                 ; (+$3c)
        ld      l,$01
        call    l92a2
        push    ix
        pop     bc
        ld      hl,$fff2
        add     hl,bc
        call    l92f6
        ld      a,c
        or      a
        jr      nz,l98ea                ; (-$3b)
        jr      l994e                   ; (+$27)
l9927:  sub     a
        ld      ($f155),a
        ld      c,$01
        jp      lbe72
l9930:  ld      a,($f113)
        ld      l,a
        call    l93be
        ld      a,c
        or      a
        jr      z,l994e                 ; (+$13)
        ld      l,$01
        call    l92a2
        push    ix
        pop     bc
        ld      hl,$fff2
        add     hl,bc
        call    l92f6
        ld      a,c
        or      a
        jr      nz,l9927                ; (-$27)
l994e:  ld      l,$c0
        call    lba5c
        bit     2,c
        jr      z,l995b                 ; (+$04)
        ld      c,$02
        jr      l995d                   ; (+$02)
l995b:  ld      c,$01
l995d:  ld      a,c
        ld      ($f155),a
        ld      c,$00
        jp      lbe72
l9966:  rst     $20
        ld      hl,$fff9
        add     hl,sp
        ld      sp,hl
        ld      (ix-$07),$00
l9970:  ld      a,(ix-$07)
        cp      (ix+$06)
        jp      p,l9993
        ld      l,(ix+$04)
        ld      h,(ix+$05)
        inc     (ix+$04)
        jr      nz,l9987                ; (+$03)
        inc     (ix+$05)
l9987:  ld      a,($f69a)
        add     a,(hl)
        ld      ($f69a),a
        inc     (ix-$07)
        jr      l9970                   ; (-$23)
l9993:  jp      lbe8b
        ld      b,$40
        ld      b,c
        ld      b,d
        ld      b,e
        ld      (bc),a
        inc     bc
        jp      nz,l0d99
        sbc     a,d
        inc     bc
        sbc     a,d
        ld      sp,hl
        sbc     a,c
        rst     $28
        sbc     a,c
        push    hl
        sbc     a,c
        cp      d
        sbc     a,c
l99ab:  rst     $20
        ld      l,$20
        call    lba5c
        ld      c,(ix+$04)
        ld      hl,$9996
        jp      lb8ed
        ld      a,($f15f)
        or      $40
        ld      ($f15f),a
l99c2:  ld      l,$34
        push    hl
        ld      l,$c3
        call    lbe62
        ld      a,($f15f)
        or      $10
        or      $08
        or      $01
        ld      l,a
        push    hl
        ld      l,$c0
        call    lbe62
        ld      l,$3c
        push    hl
        ld      l,$c3
        call    lbe62
        jp      lbe84
        ld      a,($f15f)
        and     $bf
        ld      ($f15f),a
        jr      l99c2                   ; (-$2d)
        ld      a,($f15f)
        or      $20
        ld      ($f15f),a
        jr      l99c2                   ; (-$37)
        ld      a,($f15f)
        and     $df
        ld      ($f15f),a
        jr      l99c2                   ; (-$41)
        ld      a,($f15f)
        or      $80
        ld      ($f15f),a
        jr      l99c2                   ; (-$4b)
        ld      a,($f15f)
        and     $7f
        ld      ($f15f),a
        jp      l99c2
        ld      d,e
        ld      b,c
        ld      d,(hl)
        ld      b,l
        jr      nz,l9a71                ; (+$53)
        ld      d,h
        ld      b,l
        ld      d,b
        nop     
l9a22:  rst     $30
        ld      hl,$ffc8
        add     hl,sp
        ld      sp,hl
        sub     a
        ld      ($f125),a
        ld      a,($f126)
        cp      $45
        jr      nz,l9a38                ; (+$05)
        ld      c,$01
        jp      lbe72
l9a38:  push    ix
        pop     bc
        ld      hl,$ffc9
        add     hl,bc
        call    l87c9
        ld      (ix-$38),c
        ld      hl,($f353)
        ld      bc,($f34d)
        ld      a,l
        sub     c
        ld      l,a
        ld      a,h
        sbc     a,b
        ld      h,a
        ld      a,(ix-$38)
        ld      e,a
        add     a,a
        sbc     a,a
        ld      d,a
        ld      a,l
        sub     e
        ld      a,h
        sbc     a,d
        jp      p,l9a72
        ld      l,$58
        rst     $08
        ld      l,$5f
        rst     $10
        ld      hl,$9a18
        rst     $28
        call    laaca
        ld      c,$01
        jp      lbe72
l9a72:  ld      hl,($f355)
        ld      a,(ix-$38)
        ld      e,a
        add     a,a
        sbc     a,a
        ld      d,a
        add     hl,de
        push    hl
        ld      hl,($f34d)
        push    hl
        ld      hl,($f355)
        call    l9ad7
        ld      hl,($f355)
        ld      ($f35d),hl
        ld      (ix-$07),$00
l9a92:  ld      a,(ix-$07)
        cp      (ix-$38)
        jp      p,l9ac4
        ld      hl,($f355)
        push    hl
        inc     hl
        ld      ($f355),hl
        pop     hl
        push    hl
        ld      l,(ix-$07)
        push    hl
        inc     (ix-$07)
        pop     hl
        ld      a,l
        ld      c,a
        add     a,a
        sbc     a,a
        ld      b,a
        ld      l,c
        ld      h,b
        push    hl
        push    ix
        pop     bc
        ld      hl,$ffc9
        add     hl,bc
        ex      (sp),hl
        pop     bc
        add     hl,bc
        pop     bc
        ld      a,(hl)
        ld      (bc),a
        jr      l9a92                   ; (-$32)
l9ac4:  ld      hl,($f34d)
        ld      a,(ix-$38)
        ld      e,a
        add     a,a
        sbc     a,a
        ld      d,a
        add     hl,de
        ld      ($f34d),hl
        ld      c,$00
        jp      lbe72
l9ad7:  call    lbe77
        ld      a,(ix+$06)
        sub     (ix+$04)
        ld      c,a
        ld      a,(ix+$07)
        sbc     a,(ix+$05)
        ld      b,a
        jp      c,lbe93
        inc     bc
        ld      a,(ix+$04)
        sub     (ix+$08)
        ld      a,(ix+$05)
        sbc     a,(ix+$09)
        jp      nc,l9b10
        ld      l,(ix+$08)
        ld      h,(ix+$09)
        add     hl,bc
        dec     hl
        ld      e,l
        ld      d,h
        ld      l,(ix+$06)
        ld      h,(ix+$07)
        lddr    
        jp      lbe93
l9b10:  ld      e,(ix+$08)
        ld      d,(ix+$09)
        ld      l,(ix+$04)
        ld      h,(ix+$05)
        ldir    
        jp      lbe93
l9b21:  rst     $20
        ld      l,$50
        push    hl
        ld      l,(ix+$04)
        ld      h,(ix+$05)
        call    lb66a
        jp      lbe84
l9b31:  rst     $20
l9b32:  inc     (ix+$04)
        ld      a,(ix+$04)
        ld      c,a
        add     a,a
        sbc     a,a
        ld      b,a
        ld      l,c
        ld      h,b
        add     hl,hl
        ld      bc,$f35f
        add     hl,bc
        ld      a,(hl)
        inc     hl
        or      (hl)
        jr      z,l9b32                 ; (-$16)
        ld      a,(ix+$04)
        ld      c,a
        add     a,a
        sbc     a,a
        ld      b,a
        ld      l,c
        ld      h,b
        add     hl,hl
        ld      bc,$f35f
        add     hl,bc
        ld      a,(hl)
        inc     hl
        ld      h,(hl)
        ld      l,a
        ld      c,l
        ld      b,h
        jp      lbe84
l9b5f:  rst     $20
        ld      hl,$fff6
        add     hl,sp
        ld      sp,hl
        ld      l,(ix+$04)
        ld      h,(ix+$05)
        call    l9bb5
        ld      (ix-$08),c
        ld      (ix-$07),b
        ld      l,(ix-$08)
        ld      h,(ix-$07)
        ld      a,(hl)
        cp      $2c
        jr      nz,l9baa                ; (+$2b)
        ld      l,(ix-$08)
        ld      h,(ix-$07)
        call    l9bb5
        ld      (ix-$0a),c
        ld      (ix-$09),b
        ld      l,(ix-$0a)
        ld      h,(ix-$09)
        ld      a,(hl)
        cp      $2d
        jr      nz,l9ba1                ; (+$08)
        ld      c,(ix-$0a)
        ld      b,(ix-$09)
        jr      l9ba7                   ; (+$06)
l9ba1:  ld      c,(ix-$08)
        ld      b,(ix-$07)
l9ba7:  jp      lbe84
l9baa:  ld      l,(ix-$08)
        ld      h,(ix-$07)
        ld      c,l
        ld      b,h
        jp      lbe84
l9bb5:  rst     $20
        ld      hl,$fff9
        add     hl,sp
        ld      sp,hl
l9bbb:  ld      a,(ix+$04)
        sub     $01
        ld      (ix+$04),a
        ld      a,(ix+$05)
        sbc     a,$00
        ld      (ix+$05),a
        ld      l,(ix+$04)
        ld      h,(ix+$05)
        ld      a,(hl)
        ld      (ix-$07),a
        ld      l,(ix-$07)
        call    la37b
        ld      a,c
        or      a
        jp      p,l9bed
        jr      l9bbb                   ; (-$27)
l9be2:  ld      l,(ix+$04)
        ld      h,(ix+$05)
        ld      c,l
        ld      b,h
        jp      lbe84
l9bed:  ld      a,(ix-$07)
        cp      $32
        jp      m,l9be2
        ld      a,$36
        cp      (ix-$07)
        jp      m,l9be2
        ld      l,(ix+$04)
        ld      h,(ix+$05)
        inc     hl
        ld      a,(hl)
        and     $f0
        jr      nz,l9bbb                ; (-$4e)
        jr      l9be2                   ; (-$29)
l9c0b:  rst     $20
        push    af
        push    af
        push    af
        push    af
        ld      l,(ix+$04)
        ld      h,(ix+$05)
        ld      a,(hl)
        ld      (ix-$08),a
l9c1a:  inc     (ix+$04)
        jr      nz,l9c22                ; (+$03)
        inc     (ix+$05)
l9c22:  ld      l,(ix+$04)
        ld      h,(ix+$05)
        ld      a,(hl)
        ld      (ix-$07),a
        ld      l,(ix-$07)
        call    la37b
        ld      a,c
        or      a
        jp      p,l9c50
        jr      l9c1a                   ; (-$1f)
l9c39:  ld      a,(ix-$08)
        cp      $2d
        jr      nz,l9c6f                ; (+$2f)
        ld      l,(ix+$04)
        ld      h,(ix+$05)
        inc     hl
        inc     hl
        ld      (ix+$04),l
        ld      (ix+$05),h
        jr      l9c6f                   ; (+$1f)
l9c50:  ld      a,(ix-$07)
        cp      $32
        jp      m,l9c39
        ld      a,$36
        cp      (ix-$07)
        jp      m,l9c39
        ld      l,(ix+$04)
        ld      h,(ix+$05)
        inc     hl
        ld      a,(hl)
        and     $f0
        jp      nz,l9c1a
        jr      l9c39                   ; (-$36)
l9c6f:  ld      l,(ix+$04)
        ld      h,(ix+$05)
        ld      c,l
        ld      b,h
        jp      lbe84
        inc     b
        nop     
        nop     
        nop     
        nop     
        ld      bc,$0607
        dec     b
        ex      af,af'
        nop     
        nop     
        nop     
        nop     
        nop     
        add     hl,bc
        inc     c
        ld      a,(bc)
        dec     c
        ld      c,$0f
        nop     
        nop     
        nop     
        inc     bc
        dec     de
        nop     
        djnz    l9ca8                   ; (+$11)
        add     hl,de
        nop     
        nop     
        nop     
        nop     
        ld      (de),a
        inc     de
        inc     d
        dec     d
        ld      d,$0b
        nop     
        ld      (bc),a
        nop     
        nop     
        rla     
        nop     
l9ca8:  ld      a,(de)
        inc     e
        nop     
        nop     
        nop     
        nop     
        jr      l9cb0                   ; (+$00)
l9cb0:  nop     
        nop     
        nop     
        nop     
        nop     
        nop     
        nop     
        nop     
        nop     
        dec     e
        exx     
        sbc     a,l
        ret     nc

        sbc     a,l
        push    bc
        sbc     a,l
        ret     nz

        sbc     a,l
        cp      d
        sbc     a,l
        or      b
        sbc     a,l
        and     a
        sbc     a,l
        sbc     a,(hl)
        sbc     a,l
        sub     (hl)
        sbc     a,l
        adc     a,(hl)
        sbc     a,l
        add     a,(hl)
        sbc     a,l
        ld      (hl),l
        sbc     a,l
        ld      l,h
        sbc     a,l
        ld      h,h
        sbc     a,l
        ld      e,h
        sbc     a,l
        ld      d,h
        sbc     a,l
        ld      c,l
        sbc     a,l
        ld      b,a
        sbc     a,l
        ccf     
        sbc     a,l
        scf     
        sbc     a,l
        cpl     
        sbc     a,l
        daa     
        sbc     a,l
        rra     
        sbc     a,l
        add     hl,de
        sbc     a,l
        dec     d
        sbc     a,l
        ld      de,$0c9d
        sbc     a,l
        inc     b
        sbc     a,l
        rst     $38
        sbc     a,h
        or      $9c
        inc     a
        ld      b,d
        ld      c,c
        ld      c,(hl)
        ld      b,c
        ld      d,d
        ld      e,c
        ld      a,$00
        ld      b,c
        ld      d,l
        ld      e,b
        dec     l
        nop     
        ld      d,d
        ld      d,l
        ld      c,(hl)
        jr      nz,l9d5e                ; (+$55)
        ld      d,l
        ld      d,h
        nop     
        ld      b,h
        ld      d,b
        ld      e,c
        dec     l
        nop     
        ld      c,c
        ld      b,(hl)
        jr      nz,l9d15                ; (+$00)
l9d15:  ld      d,d
        ld      b,l
        ld      b,a
        nop     
        ld      d,e
        ld      e,c
        ld      c,(hl)
        ld      b,e
        jr      nz,l9d1f                ; (+$00)
l9d1f:  ld      b,e
        ld      d,b
        ld      c,h
        jr      nz,l9d76                ; (+$52)
        ld      b,l
        ld      b,a
        nop     
        ld      b,h
        ld      b,l
        ld      b,e
        jr      nz,l9d7e                ; (+$52)
        ld      b,l
        ld      b,a
        nop     
        ld      c,c
        ld      c,(hl)
        ld      b,e
        jr      nz,l9d86                ; (+$52)
        ld      b,l
        ld      b,a
        nop     
        ld      d,e
        ld      c,b
        ld      d,d
        jr      nz,l9d8e                ; (+$52)
        ld      b,l
        ld      b,a
        nop     
        ld      d,e
        ld      c,b
        ld      c,h
        jr      nz,l9d96                ; (+$52)
        ld      b,l
        ld      b,a
        nop     
        ld      b,a
        ld      c,a
        ld      d,h
        ld      c,a
        jr      nz,l9d4d                ; (+$00)
l9d4d:  ld      c,h
        ld      b,c
        ld      b,d
        ld      b,l
        ld      c,h
        jr      nz,l9d54                ; (+$00)
l9d54:  ld      b,h
        ld      d,h
        ld      c,a
        ld      b,a
        jr      nz,l9d9a                ; (+$40)
        jr      nz,l9d5c                ; (+$00)
l9d5c:  ld      b,c
        ld      d,h
l9d5e:  ld      c,a
        ld      b,a
        jr      nz,l9da2                ; (+$40)
        jr      nz,l9d64                ; (+$00)
l9d64:  ld      d,a
        ld      b,c
        ld      c,h
        ld      c,e
        jr      nz,l9daa                ; (+$40)
        jr      nz,l9d6c                ; (+$00)
l9d6c:  ld      d,a
        ld      d,d
        ld      c,c
        ld      d,h
        ld      b,l
        jr      nz,l9db3                ; (+$40)
        jr      nz,l9d75                ; (+$00)
l9d75:  ld      b,l
l9d76:  ld      e,b
        ld      b,l
        ld      b,e
        ld      d,l
        ld      d,h
        ld      b,l
        jr      nz,l9dce                ; (+$50)
l9d7e:  ld      d,d
        ld      c,a
        ld      b,a
        ld      d,d
        ld      b,c
        ld      c,l
        jr      nz,l9d86                ; (+$00)
l9d86:  ld      d,d
        ld      b,c
        ld      c,l
        ld      d,b
        jr      nz,l9dcc                ; (+$40)
        jr      nz,l9d8e                ; (+$00)
l9d8e:  ld      d,d
        ld      b,l
        ld      b,c
        ld      b,h
        jr      nz,l9dd4                ; (+$40)
        jr      nz,l9d96                ; (+$00)
l9d96:  ld      c,c
        ld      c,a
        jr      nz,l9dee                ; (+$54)
l9d9a:  ld      b,l
        ld      d,e
        ld      d,h
        nop     
        ld      d,d
        ld      c,a
        ld      c,l
        jr      nz,l9df7                ; (+$54)
        ld      b,l
        ld      d,e
        ld      d,h
        nop     
        ld      d,d
        ld      b,c
        ld      c,l
l9daa:  jr      nz,l9df8                ; (+$4c)
        ld      c,a
        ld      c,(hl)
        ld      b,a
        nop     
        ld      d,d
        ld      b,c
        ld      c,l
l9db3:  jr      nz,l9e08                ; (+$53)
        ld      c,b
        ld      c,a
        ld      d,d
        ld      d,h
        nop     
        ld      c,h
        ld      b,l
        ld      b,c
        ld      d,d
        ld      c,(hl)
        nop     
        ld      d,e
        ld      d,h
        ld      c,a
        ld      d,b
        nop     
        ld      d,d
        ld      b,l
        ld      b,c
        ld      b,h
        jr      nz,l9e1b                ; (+$50)
        ld      d,d
l9dcc:  ld      c,a
        ld      b,d
l9dce:  ld      b,l
        nop     
        ld      b,d
        ld      d,l
        ld      d,e
        jr      nz,l9e29                ; (+$54)
        ld      b,l
        ld      d,e
        ld      d,h
        nop     
        ld      b,c
        ld      d,l
        ld      d,h
        ld      c,a
        jr      nz,l9e33                ; (+$54)
        ld      b,l
        ld      d,e
        ld      d,h
        nop     
        nop     
        nop     
        nop     
        nop     
        ld      bc,$0101
        ld      (bc),a
        ld      (bc),a
        inc     bc
        inc     bc
l9dee:  inc     bc
        inc     b
        inc     b
        inc     b
        dec     b
        ld      b,$06
        ld      b,$06
l9df7:  ld      b,$06
        ld      b,$0b
        rlca    
        ex      af,af'
        add     hl,bc
        ld      a,(bc)
        add     hl,bc
        nop     
        inc     bc
        ld      a,(bc)
        dec     c
        rrca    
        or      c
        and     c
        xor     b
l9e08:  and     c
        sbc     a,a
        and     c
        sub     e
        and     c
        inc     c
        nop     
        ld      bc,$0302
        inc     b
        dec     b
        ld      b,$07
        ex      af,af'
        add     hl,bc
        ld      a,(bc)
        dec     bc
        add     hl,bc
l9e1b:  sbc     a,a
        adc     a,c
        and     c
        ld      h,h
        and     c
        inc     l
        and     c
        and     l
        and     b
        ld      e,l
        and     b
        dec     (hl)
        and     b
        or      $9f
        or      c
        sbc     a,a
        add     a,e
        sbc     a,a
        dec     bc
        sbc     a,a
        dec     bc
        sbc     a,a
        call    pe,l209e
        ld      d,d
        ld      b,l
        ld      d,b
        ld      d,h
        nop     
        jr      nz,l9e88                ; (+$4c)
        ld      c,a
        ld      c,a
        ld      d,b
        nop     
        ld      b,(hl)
        ld      d,d
        ld      b,l
        ld      b,l
        dec     l
        ld      d,d
        ld      d,l
        ld      c,(hl)
        nop     
        ld      b,h
        ld      b,c
        ld      d,h
        ld      b,c
        nop     
        ld      b,c
        ld      b,h
        ld      b,h
        ld      d,d
        ld      b,l
        ld      d,e
        ld      d,e
        nop     
        jr      nz,l9e98                ; (+$40)
        jr      nz,l9e5a                ; (+$00)
l9e5a:  ld      b,a
        ld      c,a
        ld      d,h
        ld      c,a
        jr      nz,l9e60                ; (+$00)
l9e60:  jr      nz,l9e9f                ; (+$3d)
        jr      nz,l9e64                ; (+$00)
l9e64:  ld      b,d
        ld      c,c
        ld      d,h
        jr      nz,l9e69                ; (+$00)
l9e69:  dec     a
        jr      nz,l9e6c                ; (+$00)
l9e6c:  ld      b,e
        ld      d,h
        ld      c,h
        jr      nz,l9e71                ; (+$00)
l9e71:  dec     a
        jr      nz,l9e74                ; (+$00)
l9e74:  ld      b,d
        ld      c,c
        ld      d,h
        jr      nz,l9e79                ; (+$00)
l9e79:  ld      b,e
        ld      d,h
        ld      c,h
        jr      nz,l9e7e                ; (+$00)
l9e7e:  ld      d,e
        ld      d,h
        ld      d,e
        nop     
        ld      b,d
        ld      d,h
        ld      d,e
        jr      nz,l9e87                ; (+$00)
l9e87:  ld      d,e
l9e88:  ld      c,c
        ld      b,a
        jr      nz,l9e8c                ; (+$00)
l9e8c:  dec     l
        nop     
        jr      nz,l9ed0                ; (+$40)
        jr      nz,l9e92                ; (+$00)
l9e92:  rst     $20
        ld      hl,$fff7
        add     hl,sp
        ld      sp,hl
l9e98:  ld      l,(ix+$04)
        ld      h,(ix+$05)
        ld      ($f6a3),hl
        push    hl
        ld      hl,($f6a3)
        inc     hl
        ld      ($f6a3),hl
        pop     hl
        ld      a,(hl)
        ld      (ix-$09),a
        ld      a,(ix-$09)
        ld      c,a
        add     a,a
        sbc     a,a
        ld      b,a
        ld      l,c
        ld      h,b
        ld      bc,$9c6a
        add     hl,bc
        ld      a,(hl)
        ld      (ix-$08),a
        ld      hl,$f6a5
        ld      ($f7a5),hl
        ld      a,(ix-$08)
        ld      c,a
        add     a,a
        sbc     a,a
        ld      b,a
        ld      l,c
        ld      h,b
        add     hl,hl
        ld      bc,$9cba
        add     hl,bc
        ld      a,(hl)
        inc     hl
        ld      h,(hl)
        ld      l,a
        call    la2c0
        ld      hl,$9de3
        ld      a,(ix-$08)
        ld      e,a
        add     a,a
        sbc     a,a
        ld      d,a
        add     hl,de
        ld      c,(hl)
        ld      hl,$9e0d
        jp      lb8ed
l9eec:  ld      hl,($f6a3)
        push    hl
        inc     hl
        ld      ($f6a3),hl
        pop     hl
        ld      a,(hl)
        ld      (ix-$07),a
        ld      a,(ix-$07)
        cp      $27
        jp      nz,la1e4
        ld      hl,$9e3a
        call    la2c0
        jr      l9eec                   ; (-$1d)
        jr      l9eec                   ; (-$1f)
        ld      hl,($f6a3)
        ld      a,(hl)
        cp      $1c
        jr      z,l9f3f                 ; (+$2c)
        ld      hl,$9e8e
        call    la2c0
        call    la22e
        ld      hl,($f6a3)
        ld      a,(hl)
        cp      $1c
        jr      z,l9f49                 ; (+$25)
        ld      a,($f7a5)
        sub     $01
        ld      ($f7a5),a
        ld      a,($f7a6)
        sbc     a,$00
        ld      ($f7a6),a
        ld      hl,l9e8c
        call    la2c0
        call    la22e
        jr      l9f50                   ; (+$11)
l9f3f:  ld      hl,($f6a3)
        inc     hl
        ld      ($f6a3),hl
        jp      l9eec
l9f49:  ld      hl,($f6a3)
        inc     hl
        ld      ($f6a3),hl
l9f50:  ld      a,(ix-$09)
        cp      $16
        jr      nz,l9f60                ; (+$09)
        ld      hl,l9e87
        call    la2c0
        call    la22e
l9f60:  ld      a,(ix-$09)
        cp      $19
        jr      nz,l9f70                ; (+$09)
        ld      hl,$9e82
        call    la2c0
        call    la22e
l9f70:  ld      a,($f7a5)
        sub     $01
        ld      ($f7a5),a
        ld      a,($f7a6)
        sbc     a,$00
        ld      ($f7a6),a
        jp      l9eec
        ld      hl,($f6a3)
        ld      a,(hl)
        cp      $1e
        jr      nz,l9f9b                ; (+$10)
        ld      hl,l9e7e
        call    la2c0
        ld      hl,($f6a3)
        inc     hl
        ld      ($f6a3),hl
        jp      l9eec
l9f9b:  call    la22e
        ld      a,($f7a5)
        sub     $01
        ld      ($f7a5),a
        ld      a,($f7a6)
        sbc     a,$00
        ld      ($f7a6),a
        jp      l9eec
        ld      hl,($f6a3)
        ld      a,(hl)
        cp      $1e
        jr      nz,l9fc8                ; (+$0f)
        ld      hl,($f6a3)
        inc     hl
        ld      ($f6a3),hl
        ld      hl,l9e79
        call    la2c0
        jr      l9fcb                   ; (+$03)
l9fc8:  call    la22e
l9fcb:  ld      a,(ix-$09)
        cp      $23
        jr      nz,l9fda                ; (+$08)
        ld      hl,l9e74
        call    la2c0
        jr      l9fe0                   ; (+$06)
l9fda:  ld      hl,l9e71
        call    la2c0
l9fe0:  call    la22e
        ld      a,($f7a5)
        sub     $01
        ld      ($f7a5),a
        ld      a,($f7a6)
        sbc     a,$00
        ld      ($f7a6),a
        jp      l9eec
        ld      hl,($f6a3)
        ld      a,(hl)
        cp      $1e
        jr      nz,la00d                ; (+$0f)
        ld      hl,($f6a3)
        inc     hl
        ld      ($f6a3),hl
        ld      hl,l9e6c
        call    la2c0
        jr      la010                   ; (+$03)
la00d:  call    la22e
la010:  ld      hl,l9e69
        call    la2c0
        call    la22e
        ld      hl,l9e64
        call    la2c0
        call    la22e
        ld      a,($f7a5)
        sub     $01
        ld      ($f7a5),a
        ld      a,($f7a6)
        sbc     a,$00
        ld      ($f7a6),a
        jp      l9eec
        ld      hl,($f7a5)
        push    hl
        inc     hl
        ld      ($f7a5),hl
        ld      hl,($f6a3)
        ld      a,$09
        cp      (hl)
        jp      m,la04f
        ld      hl,($f6a3)
        ld      a,(hl)
        add     a,$30
        ld      c,a
        jr      la058                   ; (+$09)
la04f:  ld      hl,($f6a3)
        ld      a,(hl)
        add     a,$41
        add     a,$f6
        ld      c,a
la058:  pop     hl
        ld      (hl),c
        jp      l9eec
        ld      hl,($f7a5)
        push    hl
        inc     hl
        ld      ($f7a5),hl
        ld      hl,($f6a3)
        ld      a,$09
        cp      (hl)
        jp      m,la077
        ld      hl,($f6a3)
        ld      a,(hl)
        add     a,$30
        ld      c,a
        jr      la080                   ; (+$09)
la077:  ld      hl,($f6a3)
        ld      a,(hl)
        add     a,$41
        add     a,$f6
        ld      c,a
la080:  pop     hl
        ld      (hl),c
        ld      hl,($f6a3)
        inc     hl
        ld      ($f6a3),hl
        ld      hl,l9e60
        call    la2c0
        call    la22e
        ld      a,($f7a5)
        sub     $01
        ld      ($f7a5),a
        ld      a,($f7a6)
        sbc     a,$00
        ld      ($f7a6),a
        jp      l9eec
        call    la22e
        ld      a,($f6a3)
        sub     $01
        ld      ($f6a3),a
        ld      a,($f6a4)
        sbc     a,$00
        ld      ($f6a4),a
        ld      hl,($f7a5)
        push    hl
        inc     hl
        ld      ($f7a5),hl
        ld      hl,($f6a3)
        push    hl
        inc     hl
        ld      ($f6a3),hl
        pop     hl
        ld      a,(hl)
        cp      $2e
        jr      nz,la0d2                ; (+$04)
        ld      c,$3e
        jr      la0d4                   ; (+$02)
la0d2:  ld      c,$3d
la0d4:  pop     hl
        ld      (hl),c
        ld      hl,($f6a3)
        ld      a,(hl)
        cp      $2f
        jr      nz,la0f0                ; (+$12)
        ld      hl,($f7a5)
        push    hl
        inc     hl
        ld      ($f7a5),hl
        pop     hl
        ld      (hl),$3d
        ld      hl,($f6a3)
        inc     hl
        ld      ($f6a3),hl
la0f0:  ld      hl,($f7a5)
        push    hl
        inc     hl
        ld      ($f7a5),hl
        pop     hl
        ld      (hl),$20
        call    la22e
        ld      hl,l9e5a
        call    la2c0
        ld      hl,($f7a5)
        push    hl
        inc     hl
        ld      ($f7a5),hl
        ld      hl,($f6a3)
        ld      a,$09
        cp      (hl)
        jp      m,la11e
        ld      hl,($f6a3)
        ld      a,(hl)
        add     a,$30
        ld      c,a
        jr      la127                   ; (+$09)
la11e:  ld      hl,($f6a3)
        ld      a,(hl)
        add     a,$41
        add     a,$f6
        ld      c,a
la127:  pop     hl
        ld      (hl),c
        jp      l9eec
la12c:  ld      hl,($f7a5)
        push    hl
        inc     hl
        ld      ($f7a5),hl
        ld      hl,($f6a3)
        push    hl
        inc     hl
        ld      ($f6a3),hl
        pop     hl
        ld      a,(hl)
        ld      e,a
        add     a,a
        sbc     a,a
        ld      d,a
        ld      a,e
        and     $7f
        ld      e,a
        pop     hl
        ld      a,d
        and     $ff
        ld      d,a
        ld      (hl),e
        ld      a,(hl)
        cp      $74
        jr      nz,la12c                ; (-$25)
        ld      a,($f7a5)
        sub     $01
        ld      ($f7a5),a
        ld      a,($f7a6)
        sbc     a,$00
        ld      ($f7a6),a
        jp      l9eec
        ld      hl,($f6a3)
        ld      a,(hl)
        cp      $1c
        jp      z,l9eec
        ld      hl,$9e56
        call    la2c0
        call    la22e
        ld      a,($f7a5)
        sub     $01
        ld      ($f7a5),a
        ld      a,($f7a6)
        sbc     a,$00
        ld      ($f7a6),a
        jp      l9eec
        ld      hl,($f6a3)
        ld      c,(hl)
        ld      hl,$9e01
        jp      lb8ed
        ld      hl,$9e4e
        call    la2c0
        jp      l9eec
la19c:  jp      l9eec
        ld      hl,$9e49
        call    la2c0
        jp      l9eec
        ld      hl,$9e40
        call    la2c0
        jp      l9eec
        ld      hl,($f7a5)
        push    hl
        inc     hl
        ld      ($f7a5),hl
        ld      hl,($f6a3)
        ld      a,$09
        cp      (hl)
        jp      m,la1cb
        ld      hl,($f6a3)
        ld      a,(hl)
        add     a,$30
        ld      c,a
        jr      la1d4                   ; (+$09)
la1cb:  ld      hl,($f6a3)
        ld      a,(hl)
        add     a,$41
        add     a,$f6
        ld      c,a
la1d4:  pop     hl
        ld      (hl),c
        jp      l9eec
la1d9:  ld      hl,($f7a5)
        ld      (hl),$00
        ld      bc,$f6a5
        jp      lbe8b
la1e4:  ld      a,(ix-$07)
        cp      $26
        jr      nz,la1d9                ; (-$12)
        ld      hl,$9e34
        call    la2c0
        jp      l9eec
        add     hl,hl
        and     d
        dec     h
        and     d
        jr      nz,la19c                ; (-$5e)
        dec     de
        and     d
        ld      d,$a2
        ld      de,$0ca2
        and     d
        ld      a,(bc)
        and     d
        ld      b,$a2
        ld      d,d
        ld      b,l
        ld      b,a
        nop     
        ld      hl,($4300)
        ld      d,b
        ld      c,h
        jr      nz,la211                ; (+$00)
la211:  ld      b,h
        ld      b,l
        ld      b,e
        jr      nz,la216                ; (+$00)
la216:  ld      c,c
        ld      c,(hl)
        ld      b,e
        jr      nz,la21b                ; (+$00)
la21b:  ld      d,e
        ld      c,b
        ld      d,d
        jr      nz,la220                ; (+$00)
la220:  ld      d,e
        ld      c,b
        ld      c,h
        jr      nz,la225                ; (+$00)
la225:  ld      c,a
        ld      d,d
        jr      nz,la229                ; (+$00)
la229:  ld      b,c
        ld      c,(hl)
        ld      b,h
        jr      nz,la22e                ; (+$00)
la22e:  rst     $30
        ld      hl,$fff9
        add     hl,sp
        ld      sp,hl
la234:  ld      hl,($f6a3)
        push    hl
        inc     hl
        ld      ($f6a3),hl
        pop     hl
        ld      a,(hl)
        ld      (ix-$07),a
        ld      a,(ix-$07)
        cp      $1c
        jr      z,la25d                 ; (+$15)
        ld      a,(ix-$07)
        cp      $2f
        jr      z,la25d                 ; (+$0e)
        ld      a,(ix-$07)
        cp      $2e
        jr      z,la25d                 ; (+$07)
        ld      a,(ix-$07)
        cp      $2c
        jr      nz,la260                ; (+$03)
la25d:  jp      lbe72
la260:  ld      l,(ix-$07)
        ld      a,l
        and     $f0
        jp      nz,la2a6
        ld      hl,($f7a5)
        push    hl
        inc     hl
        ld      ($f7a5),hl
        pop     hl
        push    hl
        ld      a,$09
        cp      (ix-$07)
        jp      m,la284
        ld      c,(ix-$07)
        ld      a,c
        add     a,$30
        ld      c,a
        jr      la28d                   ; (+$09)
la284:  ld      c,(ix-$07)
        ld      a,c
        add     a,$41
        add     a,$f6
        ld      c,a
la28d:  pop     hl
        ld      (hl),c
        ld      hl,($f6a3)
        ld      a,(hl)
        and     $f0
        jp      z,la234
        ld      hl,($f7a5)
        push    hl
        inc     hl
        ld      ($f7a5),hl
        pop     hl
        ld      (hl),$20
        jp      la234
la2a6:  ld      l,(ix-$07)
        ld      a,l
        add     a,a
        ld      l,a
        ld      c,a
        add     a,a
        sbc     a,a
        ld      b,a
        ld      l,c
        ld      h,b
        ld      bc,$a194
        add     hl,bc
        ld      a,(hl)
        inc     hl
        ld      h,(hl)
        ld      l,a
        call    la2c0
        jp      la234
la2c0:  rst     $20
la2c1:  ld      hl,($f7a5)
        ld      c,(ix+$04)
        ld      b,(ix+$05)
        inc     (ix+$04)
        jr      nz,la2d2                ; (+$03)
        inc     (ix+$05)
la2d2:  ld      a,(bc)
        ld      (hl),a
        ld      a,(hl)
        or      a
        jr      z,la2e1                 ; (+$09)
        ld      hl,($f7a5)
        inc     hl
        ld      ($f7a5),hl
        jr      la2c1                   ; (-$20)
la2e1:  jp      lbe84
        ld      d,e
        ld      b,c
        ld      d,(hl)
        ld      b,l
        jr      nz,la335                ; (+$4b)
        ld      b,l
        ld      e,c
        nop     
la2ed:  rst     $20
        ld      hl,$f353
        ld      a,($f34d)
        sub     (hl)
        ld      a,($f34e)
        inc     hl
        sbc     a,(hl)
        jr      c,la30e                 ; (+$12)
        ld      l,$58
        rst     $08
        ld      l,$5f
        rst     $10
        ld      hl,$a2e4
        rst     $28
        call    laaca
        ld      c,$01
        jp      lbe84
la30e:  ld      hl,($f355)
        inc     hl
        push    hl
        ld      hl,($f34d)
        push    hl
        ld      hl,($f355)
        call    l9ad7
        ld      hl,($f355)
        push    hl
        inc     hl
        ld      ($f355),hl
        pop     hl
        ld      a,(ix+$04)
        ld      (hl),a
        ld      hl,($f34d)
        inc     hl
        ld      ($f34d),hl
        ld      c,$00
        jp      lbe84
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        nop     
        rst     $38
        rst     $38
        rst     $38
        ld      bc,$0302
        inc     b
        dec     b
        ld      b,$ff
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rlca    
        ex      af,af'
        add     hl,bc
        ld      a,(bc)
        dec     bc
        inc     c
        rst     $38
        rst     $38
        rst     $38
        dec     c
        ld      c,$ff
        rrca    
        djnz    la375                   ; (+$11)
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        ld      (de),a
        inc     de
        inc     d
        dec     d
        ld      d,$17
        rst     $38
        add     hl,de
        rst     $38
        rst     $38
        ld      a,(de)
        rst     $38
        dec     de
la375:  inc     e
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        jr      la363                   ; (-$19)
        ld      l,(ix+$04)
        ld      a,l
        and     $80
        ld      l,a
        jr      z,la38a                 ; (+$05)
        ld      c,$ff
        jp      lbe84
la38a:  ld      a,(ix+$04)
        cp      $53
        jr      nz,la396                ; (+$05)
        ld      c,$1d
        jp      lbe84
la396:  ld      a,(ix+$04)
        cp      $50
        jr      nz,la3a2                ; (+$05)
        ld      c,$1e
        jp      lbe84
la3a2:  ld      a,(ix+$04)
        or      a
        jp      m,la3b9
        ld      a,(ix+$04)
        ld      e,a
        add     a,a
        sbc     a,a
        ld      d,a
        ld      a,e
        sub     $45
        ld      a,d
        sbc     a,$00
        jp      m,la3be
la3b9:  ld      c,$ff
        jp      lbe84
la3be:  ld      hl,$a336
        ld      a,(ix+$04)
        ld      e,a
        add     a,a
        sbc     a,a
        ld      d,a
        add     hl,de
        ld      c,(hl)
        jp      lbe84
la3cd:  rst     $20
        ld      hl,$fff9
        add     hl,sp
        ld      sp,hl
        ld      l,$76
        rst     $10
        ld      hl,$043d
        push    hl
        ld      hl,$0441
        push    hl
        ld      l,(ix+$04)
        ld      a,l
        or      $08
        ld      l,a
        push    hl
        ld      l,$10
        push    hl
        ld      hl,$f139
        call    l784c
        ld      (ix-$07),c
        ld      a,(ix-$07)
        or      a
        jr      nz,la3fd                ; (+$05)
        ld      c,$00
        jp      lbe84
la3fd:  ld      a,(ix-$07)
        cp      $02
        jr      nz,la415                ; (+$11)
        ld      l,$59
        rst     $08
        ld      l,$5a
        rst     $08
        ld      l,$5a
        rst     $08
        ld      l,$1c
        rst     $10
        ld      c,$02
        jp      lbe84
la415:  ld      l,$77
        rst     $10
        ld      hl,$043d
        push    hl
        ld      hl,$f139
        push    hl
        ld      l,(ix+$04)
        ld      a,l
        or      $08
        ld      l,a
        push    hl
        ld      l,$10
        push    hl
        ld      hl,$f121
        call    l784c
        ld      (ix-$07),c
        ld      a,(ix-$07)
        or      a
        jr      nz,la43f                ; (+$05)
        ld      c,$00
        jp      lbe84
la43f:  ld      a,(ix-$07)
        cp      $02
        jr      nz,la461                ; (+$1b)
        ld      l,$59
        rst     $08
        ld      l,$5a
        rst     $08
        ld      l,$5a
        rst     $08
        ld      l,$1c
        rst     $10
        ld      hl,$f121
        push    hl
        ld      hl,$f139
        push    hl
        rst     $18
        pop     af
        ld      c,$01
        jp      lbe84
la461:  ld      c,$01
        jp      lbe84
la466:  rst     $30
        ld      hl,$f139
        push    hl
        ld      de,$f935
        rst     $38
        ld      hl,$f935
        push    hl
        ld      a,($f0b6)
        ld      ($f93f),a
        add     a,a
        sbc     a,a
        ld      ($f940),a
        ld      ($f93e),a
        ld      ($f93d),a
        ld      hl,$f93d
        push    hl
        call    lbb91
        ld      a,($f0b6)
        ld      ($f93f),a
        add     a,a
        sbc     a,a
        ld      ($f940),a
        ld      ($f93e),a
        ld      ($f93d),a
        ld      hl,$f93d
        push    hl
        call    lbd3e
        rst     $18
        pop     af
        ld      hl,$f121
        push    hl
        ld      de,$f935
        rst     $38
        ld      hl,$f935
        push    hl
        ld      a,($f0b6)
        ld      ($f93f),a
        add     a,a
        sbc     a,a
        ld      ($f940),a
        ld      ($f93e),a
        ld      ($f93d),a
        ld      hl,$f93d
        push    hl
        call    lbb91
        ld      a,($f0b6)
        ld      ($f93f),a
        add     a,a
        sbc     a,a
        ld      ($f940),a
        ld      ($f93e),a
        ld      ($f93d),a
        ld      hl,$f93d
        push    hl
        call    lbd3e
        rst     $18
        jp      lbe72
la4e5:  rst     $20
        push    af
        push    af
        push    af
        push    af
        ld      l,$5b
        rst     $08
        ld      (ix-$08),$01
        ld      hl,$f33b
        push    hl
        ld      hl,$0441
        push    hl
        rst     $18
        pop     af
        ld      l,$60
        rst     $10
        ld      a,(ix+$06)
        cp      $10
        jr      nz,la509                ; (+$04)
        ld      c,$03
        jr      la50b                   ; (+$02)
la509:  ld      c,$04
la50b:  ld      (ix-$07),c
la50e:  ld      c,(ix-$07)
        sub     a
        ld      b,a
        ld      l,c
        ld      h,b
        ld      a,l
        or      $80
        ld      l,a
        call    l7395
        ld      a,c
        cp      $01
        jr      nz,la52c                ; (+$0b)
        call    lb8e6
        ld      l,$5c
        rst     $08
        ld      c,$02
        jp      lbe8b
la52c:  ld      a,($f127)
        cp      $1c
        jr      nz,la54b                ; (+$18)
        ld      l,$5c
        rst     $08
        ld      a,(ix-$08)
        or      a
        jr      nz,la55e                ; (+$22)
        ld      l,(ix+$04)
        ld      h,(ix+$05)
        push    hl
        ld      hl,$f33b
        push    hl
        rst     $18
        pop     af
        jr      la56e                   ; (+$23)
la54b:  ld      a,($f127)
        cp      $1d
        jr      nz,la573                ; (+$21)
        ld      a,(ix-$08)
        or      a
        jr      z,la580                 ; (+$28)
        call    l736f
        jp      la50e
la55e:  ld      l,$01
        push    hl
        ld      l,(ix+$06)
        push    hl
        ld      l,(ix+$04)
        ld      h,(ix+$05)
        call    l7fc5
la56e:  ld      c,$00
        jp      lbe8b
la573:  ld      a,($f33c)
        and     $f0
        jr      z,la594                 ; (+$1a)
        call    l736f
        jp      la50e
la580:  ld      l,$59
        rst     $08
        ld      hl,$f33b
        push    hl
        ld      hl,$0441
        push    hl
        rst     $18
        pop     af
        ld      (ix-$08),$01
        jp      la50e
la594:  ld      a,($f127)
        ld      l,a
        rst     $10
        ld      hl,$f33b
        push    hl
        push    ix
        pop     bc
        ld      hl,$0006
        add     hl,bc
        ld      c,l
        ld      b,h
        sub     a
        ld      ($f935),a
        ld      ($f936),a
        ld      a,(bc)
        ld      ($f937),a
        sub     a
        ld      ($f938),a
        ld      hl,$f935
        push    hl
        ld      hl,$f33b
        push    hl
        call    lbd3e
        ld      a,($f127)
        ld      ($f93f),a
        add     a,a
        sbc     a,a
        ld      ($f940),a
        ld      ($f93e),a
        ld      ($f93d),a
        ld      hl,$f93d
        push    hl
        call    lba62
        rst     $18
        pop     af
        ld      (ix-$08),$00
        jp      la50e
la5e1:  rst     $30
        push    af
        push    af
        push    af
        push    af
        sub     a
        ld      ($f0b9),a
        ld      a,($f0ba)
        or      a
        jr      z,la5f7                 ; (+$07)
        ld      a,($f0ba)
        ld      l,a
        call    la661
la5f7:  ld      a,($f0bd)
        or      a
        jr      z,la604                 ; (+$07)
        ld      a,($f0bd)
        ld      l,a
        call    la661
la604:  ld      a,($f0bc)
        or      a
        jr      z,la611                 ; (+$07)
        ld      a,($f0bc)
        ld      l,a
        call    la661
la611:  ld      l,$81
        call    lba5c
        ld      (ix-$07),$00
la61a:  ld      hl,$f0bb
        ld      a,(ix-$07)
        cp      (hl)
        jr      nc,la633                ; (+$10)
        ld      (ix-$08),$00
la627:  ld      a,(ix-$08)
        cp      $ff
        jr      nc,la63a                ; (+$0c)
        inc     (ix-$08)
        jr      la627                   ; (-$0c)
la633:  sub     a
        ld      ($f0b9),a
        jp      lbe72
la63a:  inc     (ix-$07)
        jr      la61a                   ; (-$25)
la63f:  rst     $20
la640:  ld      l,(ix+$04)
        ld      h,(ix+$05)
        ld      a,(hl)
        or      a
        jr      z,la65e                 ; (+$14)
        ld      l,(ix+$04)
        ld      h,(ix+$05)
        inc     (ix+$04)
        jr      nz,la658                ; (+$03)
        inc     (ix+$05)
la658:  ld      l,(hl)
        call    la661
        jr      la640                   ; (-$1e)
la65e:  jp      lbe84
la661:  rst     $20
        ld      hl,$f137
        ld      a,($f0b9)
        cp      (hl)
        jr      c,la66e                 ; (+$03)
        call    la5e1
la66e:  ld      a,($f0b9)
        add     a,$01
        ld      ($f0b9),a
la676:  ld      l,$e2
        call    lba5c
        bit     4,c
        jr      z,la676                 ; (-$09)
        ld      l,(ix+$04)
        push    hl
        ld      l,$e3
        call    lbe62
        ld      l,$81
        call    lba5c
        jp      lbe84
la690:  rst     $30
        ld      hl,$fff9
        add     hl,sp
        ld      sp,hl
la696:  ld      l,$e2
        call    lba5c
        bit     3,c
        jr      nz,la6c7                ; (+$28)
        ld      a,($f134)
        ld      (ix-$07),a
        ld      a,($f134)
        and     $f7
        ld      ($f134),a
        ld      l,$17
        call    l7395
        ld      l,(ix-$07)
        call    lb11f
        ld      a,($f127)
        cp      $45
        jr      nz,la6cf                ; (+$10)
        call    lb8e6
        ld      c,$00
        jp      lbe72
la6c7:  ld      l,$e1
        call    lba5c
        jp      lbe72
la6cf:  ld      a,($f359)
        sub     $01
        ld      ($f359),a
        ld      a,($f35a)
        sbc     a,$00
        ld      ($f35a),a
        jr      la696                   ; (-$4b)
        nop     
        nop     
        nop     
        nop     
        nop     
        nop     
        ld      bc,l0000
        nop     
        ld      a,(bc)
        nop     
        nop     
        nop     
        rrca    
        nop     
la6f1:  rst     $20
        ld      hl,$fff9
        add     hl,sp
        ld      sp,hl
        ld      hl,$f7c7
        push    hl
        ld      l,(ix+$04)
        ld      h,(ix+$05)
        push    hl
        rst     $18
        pop     af
        ld      a,(ix+$06)
        cp      $10
        jp      nz,la74c
        ld      (ix-$07),$07
la710:  ld      a,(ix-$07)
        or      a
        jp      m,la794
        ld      hl,$f7a7
        ld      a,(ix-$07)
        ld      e,a
        add     a,a
        sbc     a,a
        ld      d,a
        add     hl,de
        push    hl
        ld      hl,$f7c7
        ld      de,$f935
        rst     $38
        ld      hl,$f935
        push    hl
        ld      hl,$a6ed
        push    hl
        call    lba8d
        pop     hl
        pop     bc
        inc     hl
        inc     hl
        ld      a,(hl)
        ld      (bc),a
        ld      hl,$f7c7
        push    hl
        ld      hl,l0004
        push    hl
        call    lbd0f
        pop     af
        dec     (ix-$07)
        jr      la710                   ; (-$3c)
la74c:  ld      a,(ix+$06)
        cp      $02
        jp      nz,la79a
        ld      (ix-$07),$1f
la758:  ld      a,(ix-$07)
        or      a
        jp      m,la794
        ld      hl,$f7a7
        ld      a,(ix-$07)
        ld      e,a
        add     a,a
        sbc     a,a
        ld      d,a
        add     hl,de
        push    hl
        ld      hl,$f7c7
        ld      de,$f935
        rst     $38
        ld      hl,$f935
        push    hl
        ld      hl,$a6e5
        push    hl
        call    lba8d
        pop     hl
        pop     bc
        inc     hl
        inc     hl
        ld      a,(hl)
        ld      (bc),a
        ld      hl,$f7c7
        push    hl
        ld      hl,$0001
        push    hl
        call    lbd0f
        pop     af
        dec     (ix-$07)
        jr      la758                   ; (-$3c)
la794:  ld      bc,$f7a7
        jp      lbe8b
la79a:  ld      hl,$f7cb
        push    hl
        ld      hl,$f7c7
        push    hl
        rst     $18
        pop     af
        ld      (ix-$07),$09
la7a8:  ld      a,(ix-$07)
        or      a
        jp      m,la80b
        ld      hl,$f7cb
        push    hl
        ld      hl,$a6e1
        push    hl
        call    lbad9
        jp      z,la80b
        ld      hl,$f7cb
        push    hl
        ld      hl,$a6e9
        push    hl
        call    lbb91
        pop     af
        ld      hl,$f7a7
        ld      a,(ix-$07)
        ld      e,a
        add     a,a
        sbc     a,a
        ld      d,a
        add     hl,de
        push    hl
        ld      hl,$f7c7
        ld      de,$f935
        rst     $38
        ld      hl,$f935
        push    hl
        ld      hl,$a6e9
        ld      de,$f93d
        rst     $38
        ld      hl,$f93d
        push    hl
        ld      hl,$f7cb
        push    hl
        call    lbd3e
        call    lbdf7
        pop     hl
        pop     bc
        inc     hl
        inc     hl
        ld      a,(hl)
        ld      (bc),a
        ld      hl,$f7c7
        push    hl
        ld      hl,$f7cb
        push    hl
        rst     $18
        pop     af
        dec     (ix-$07)
        jp      la7a8
la80b:  ld      a,(ix-$07)
        or      a
        jp      m,la794
        ld      l,(ix-$07)
        push    hl
        dec     (ix-$07)
        pop     hl
        ld      a,l
        ld      c,a
        add     a,a
        sbc     a,a
        ld      b,a
        ld      l,c
        ld      h,b
        ld      bc,$f7a7
        add     hl,bc
        ld      (hl),$00
        jr      la80b                   ; (-$1e)
        jr      nz,la87a                ; (+$4f)
        ld      b,(hl)
        jr      nz,la87e                ; (+$50)
        ld      d,d
        ld      c,a
        ld      b,a
        ld      d,d
        ld      b,c
        ld      c,l
        jr      nz,la836                ; (+$00)
la836:  ld      b,l
        ld      c,(hl)
        ld      b,h
        nop     
        ld      d,e
        ld      d,h
        ld      b,c
        ld      d,d
        ld      d,h
        nop     
la840:  rst     $20
        ld      l,$58
        rst     $08
        ld      a,(ix+$04)
        cp      $53
        jr      nz,la850                ; (+$05)
        ld      bc,$a83a
        jr      la853                   ; (+$03)
la850:  ld      bc,la836
la853:  ld      l,c
        ld      h,b
        rst     $28
        ld      hl,$a829
        rst     $28
        ld      a,($f429)
        ld      ($f0c7),a
        ld      l,$01
        push    hl
        ld      l,$0a
        push    hl
        ld      hl,$f0c5
        call    l7fc5
        jp      lbe84
la86f:  rst     $30
        ld      hl,$ffc8
        add     hl,sp
        ld      sp,hl
        ld      l,$01
        call    lb136
la87a:  ld      l,$10
        call    lb11f
        ld      (ix-$08),$01
la883:  ld      l,$16
        call    l7395
        ld      a,c
        cp      $01
        jr      nz,la898                ; (+$0b)
        call    lb8e6
        ld      l,$10
        call    lb136
        jp      lbe72
la898:  ld      a,($f127)
        cp      $1b
        jr      nz,la8ab                ; (+$0c)
        ld      a,(ix-$08)
        cp      $02
        jr      nz,la8b8                ; (+$12)
        call    l736f
        jr      la883                   ; (-$28)
la8ab:  ld      a,(ix-$08)
        cp      $01
        jp      nz,la908
        call    l736f
        jr      la883                   ; (-$35)
la8b8:  ld      (ix-$08),$02
        ld      l,$10
        call    lb136
        push    ix
        pop     bc
        ld      hl,$ffc8
        add     hl,bc
        call    l81ba
        ld      l,$71
        rst     $08
        ld      l,$58
        rst     $08
        ld      (ix-$07),$00
la8d5:  ld      hl,$f34b
        ld      a,(ix-$07)
        cp      (hl)
        jr      nc,la8ff                ; (+$21)
        ld      hl,$f117
        ld      e,(ix-$07)
        sub     a
        ld      d,a
        add     hl,de
        ld      a,(hl)
        ld      ($f0c7),a
        ld      l,$02
        push    hl
        ld      l,$0a
        push    hl
        ld      hl,$f0c5
        call    l7fc5
        ld      l,$63
        rst     $10
        inc     (ix-$07)
        jr      la8d5                   ; (-$2a)
la8ff:  ld      l,$5a
        rst     $08
        ld      l,$72
        rst     $08
        jp      la883
la908:  ld      (ix-$08),$01
        ld      l,$10
        call    lb11f
        push    ix
        pop     bc
        ld      hl,$ffc8
        add     hl,bc
        call    l8623
        jp      la883
        ld      d,b
        ld      d,d
        ld      c,a
        ld      b,a
        ld      d,d
        ld      b,c
        ld      c,l
        ld      d,e
        nop     
la927:  rst     $30
        ld      hl,$ff93
        add     hl,sp
        ld      sp,hl
        ld      (ix-$07),$00
        ld      (ix-$09),$00
la935:  ld      a,(ix-$07)
        cp      $64
        jr      nc,la96b                ; (+$2f)
        ld      c,(ix-$07)
        sub     a
        ld      b,a
        ld      l,c
        ld      h,b
        add     hl,hl
        ld      bc,$f35f
        add     hl,bc
        ld      a,(hl)
        inc     hl
        or      (hl)
        jr      z,la97a                 ; (+$2d)
        ld      l,(ix-$09)
        push    hl
        inc     (ix-$09)
        pop     hl
        ld      c,l
        sub     a
        ld      b,a
        ld      l,c
        ld      h,b
        push    hl
        push    ix
        pop     bc
        ld      hl,$ff93
        add     hl,bc
        ex      (sp),hl
        pop     bc
        add     hl,bc
        ld      a,(ix-$07)
        ld      (hl),a
        jr      la97a                   ; (+$0f)
la96b:  ld      a,(ix-$09)
        or      a
        jr      nz,la980                ; (+$0f)
        ld      l,$58
        rst     $08
        ld      l,$7a
        rst     $10
        jp      lbe72
la97a:  inc     (ix-$07)
        jp      la935
la980:  ld      (ix-$08),$00
la984:  ld      l,$71
        rst     $08
        ld      l,$58
        rst     $08
        ld      hl,$a91e
        rst     $28
        ld      a,(ix-$08)
        ld      (ix-$07),a
la994:  ld      l,(ix-$08)
        ld      a,l
        add     a,$08
        ld      l,a
        ld      a,(ix-$07)
        cp      l
        jr      nc,la9ce                ; (+$2d)
        ld      a,(ix-$07)
        cp      (ix-$09)
        jr      nc,la9ce                ; (+$25)
        ld      l,$63
        rst     $10
        push    ix
        pop     bc
        ld      hl,$ff93
        add     hl,bc
        ld      e,(ix-$07)
        sub     a
        ld      d,a
        add     hl,de
        ld      a,(hl)
        ld      ($f0c7),a
        ld      l,$02
        push    hl
        ld      l,$0a
        push    hl
        ld      hl,$f0c5
        call    l7fc5
        inc     (ix-$07)
        jr      la994                   ; (-$3a)
la9ce:  ld      l,$72
        rst     $08
        ld      a,(ix-$07)
        cp      (ix-$09)
        jr      nc,la9e0                ; (+$07)
        ld      l,$10
        call    lb11f
        jr      la9e5                   ; (+$05)
la9e0:  ld      l,$10
        call    lb136
la9e5:  ld      l,$16
        call    l7395
        ld      a,c
        cp      $01
        jr      nz,la9fa                ; (+$0b)
        call    lb8e6
        ld      l,$10
        call    lb136
        jp      lbe72
la9fa:  ld      a,($f127)
        cp      $1b
        jr      nz,laa0f                ; (+$0e)
        ld      a,(ix-$07)
        cp      (ix-$09)
        jr      nz,laa1b                ; (+$12)
        call    l736f
        jp      la984
laa0f:  ld      a,(ix-$08)
        or      a
        jr      nz,laa26                ; (+$11)
        call    l736f
        jp      la984
laa1b:  ld      a,(ix-$08)
        add     a,$08
        ld      (ix-$08),a
        jp      la984
laa26:  ld      a,(ix-$08)
        sub     $08
        ld      (ix-$08),a
        jp      la984
laa31:  rst     $20
        ld      hl,$fff4
        add     hl,sp
        ld      sp,hl
        ld      l,(ix+$06)
        push    hl
        ld      l,(ix+$04)
        ld      h,(ix+$05)
        call    la6f1
        ld      (ix-$0a),c
        ld      (ix-$09),b
        ld      a,(ix+$06)
        cp      $10
        jr      nz,laa57                ; (+$06)
        ld      (ix-$0b),$08
        jr      laa5b                   ; (+$04)
laa57:  ld      (ix-$0b),$0a
laa5b:  ld      l,(ix-$0b)
        ld      a,l
        sub     (ix+$08)
        ld      l,a
        ld      (ix-$08),l
        ld      (ix-$07),$00
laa6a:  ld      a,(ix-$07)
        cp      (ix-$08)
        jr      nc,laa87                ; (+$15)
        ld      l,(ix-$0a)
        ld      h,(ix-$09)
        ld      e,(ix-$07)
        sub     a
        ld      d,a
        add     hl,de
        ld      a,(hl)
        or      a
        jr      nz,laa87                ; (+$05)
        inc     (ix-$07)
        jr      laa6a                   ; (-$1d)
laa87:  ld      a,(ix-$07)
        cp      (ix-$0b)
        jr      nc,laac7                ; (+$38)
        ld      l,(ix-$07)
        push    hl
        inc     (ix-$07)
        pop     hl
        ld      c,l
        sub     a
        ld      b,a
        ld      l,c
        ld      h,b
        ld      c,(ix-$0a)
        ld      b,(ix-$09)
        add     hl,bc
        ld      a,(hl)
        ld      (ix-$0c),a
        ld      a,$09
        cp      (ix-$0c)
        jp      m,laab8
        ld      c,(ix-$0c)
        ld      a,c
        add     a,$30
        ld      c,a
        jr      laac1                   ; (+$09)
laab8:  ld      c,(ix-$0c)
        ld      a,c
        add     a,$41
        add     a,$f6
        ld      c,a
laac1:  ld      l,c
        call    la661
        jr      laa87                   ; (-$40)
laac7:  jp      lbe93
laaca:  rst     $30
laacb:  ld      l,$11
        call    l7395
        ld      a,($f127)
        cp      $1d
        jr      nz,laadc                ; (+$05)
        ld      bc,$0001
        jr      laadf                   ; (+$03)
laadc:  ld      bc,l0000
laadf:  ld      a,c
        or      b
        jr      z,laae8                 ; (+$05)
        call    l736f
        jr      laacb                   ; (-$1d)
laae8:  ld      a,($f127)
        cp      $1a
        jr      nz,lab05                ; (+$16)
        ld      hl,($f355)
        ld      ($f35d),hl
        ld      a,(hl)
        cp      $50
        jr      z,lab05                 ; (+$0b)
        ld      hl,($f355)
        call    l9c0b
        ld      l,c
        ld      h,b
        ld      ($f355),hl
lab05:  call    lb8e6
        jp      lbe72
        jr      nz,lab4f                ; (+$42)
        ld      e,c
        ld      d,h
        ld      b,l
        ld      d,e
        jr      nz,lab5f                ; (+$4c)
        ld      b,l
        ld      b,(hl)
        ld      d,h
        nop     
        ld      d,b
        ld      d,d
        ld      c,a
        ld      b,a
        jr      nz,lab1d                ; (+$00)
lab1d:  rst     $20
        ld      l,$71
        rst     $08
        ld      l,$58
        rst     $08
        ld      hl,$ab17
        rst     $28
        ld      a,($f429)
        ld      ($f0c7),a
        ld      l,$01
        push    hl
        ld      l,$0a
        push    hl
        ld      hl,$f0c5
        call    l7fc5
        ld      l,(ix+$04)
        rst     $10
        ld      hl,$e800
        ld      bc,($f34f)
        ld      a,l
        sub     c
        ld      l,a
        ld      a,h
        sbc     a,b
        ld      h,a
        ld      bc,$ffd0
        add     hl,bc
lab4f:  ld      ($f349),hl
        ld      a,($f34a)
        and     $80
        ld      l,a
        jr      z,lab61                 ; (+$07)
        sub     a
        ld      ($f349),a
        ld      ($f34a),a
lab61:  sub     a
        ld      ($f347),a
        ld      ($f348),a
        ld      l,$01
        push    hl
        ld      l,$0a
        push    hl
        ld      hl,$f347
        call    l7fc5
        ld      hl,$ab0b
        rst     $28
        ld      l,$72
        rst     $08
        ld      a,$01
        ld      ($f140),a
        ld      l,$02
        call    lb136
        jp      lbe84
        ld      b,h
        ld      b,l
        ld      c,h
        ld      b,l
        ld      d,h
        ld      b,l
        jr      nz,labe0                ; (+$50)
        ld      d,d
        ld      c,a
        ld      b,a
        jr      nz,lab95                ; (+$00)
lab95:  rst     $20
        ld      hl,$fff6
        add     hl,sp
        ld      sp,hl
        ld      l,$71
        rst     $08
        ld      l,$58
        rst     $08
        ld      hl,$ab88
        rst     $28
        ld      a,($f429)
        ld      ($f0c7),a
        ld      l,$01
        push    hl
        ld      l,$0a
        push    hl
        ld      hl,$f0c5
        call    l7fc5
        ld      l,$48
        rst     $10
        ld      l,$72
        rst     $08
        ld      l,$05
        call    l7395
        ld      a,($f127)
        cp      $1d
        jr      nz,labce                ; (+$05)
        ld      c,$00
        jp      lbe8b
labce:  ld      a,($f127)
        cp      $1c
        jp      nz,lac3a
        ld      hl,($f42a)
        push    hl
        ld      l,(ix+$06)
        ld      h,(ix+$07)
labe0:  push    hl
        ld      l,(ix+$04)
        ld      h,(ix+$05)
        call    l9ad7
        ld      a,($f429)
        ld      l,a
        call    l9b31
        ld      hl,$f42a
        ld      a,c
        sub     (hl)
        ld      c,a
        ld      a,b
        inc     hl
        sbc     a,(hl)
        ld      b,a
        ld      (ix-$0a),c
        ld      (ix-$09),b
        ld      a,($f429)
        inc     a
        ld      l,a
        ld      (ix-$07),l
lac09:  ld      a,(ix-$07)
        cp      $64
        jr      nc,lac42                ; (+$32)
        ld      c,(ix-$07)
        sub     a
        ld      b,a
        ld      l,c
        ld      h,b
        add     hl,hl
        ld      bc,$f35f
        add     hl,bc
        ld      a,(hl)
        inc     hl
        or      (hl)
        jr      z,lac73                 ; (+$52)
        ld      c,(ix-$07)
        sub     a
        ld      b,a
        ld      l,c
        ld      h,b
        add     hl,hl
        ld      bc,$f35f
        add     hl,bc
        ld      a,(hl)
        sub     (ix-$0a)
        ld      (hl),a
        inc     hl
        ld      a,(hl)
        sbc     a,(ix-$09)
        ld      (hl),a
        jr      lac73                   ; (+$39)
lac3a:  call    lb8e6
lac3d:  ld      c,$01
        jp      lbe8b
lac42:  ld      a,($f34f)
        sub     (ix-$0a)
        ld      ($f34f),a
        ld      a,($f350)
        sbc     a,(ix-$09)
        ld      ($f350),a
        ld      hl,($f34f)
        ld      ($f427),hl
        ld      a,($f429)
        ld      c,a
        sub     a
        ld      b,a
        ld      l,c
        ld      h,b
        add     hl,hl
        ld      bc,$f35f
        add     hl,bc
        ld      (hl),$00
        inc     hl
        ld      (hl),$00
        ld      l,$4e
        call    lab1d
        jr      lac3d                   ; (-$36)
lac73:  inc     (ix-$07)
        jp      lac09
lac79:  rst     $30
        ld      l,$17
        call    l767c
        ld      a,c
        or      a
        jr      z,laca4                 ; (+$21)
        ld      a,($f126)
        cp      $28
        jr      nz,laca9                ; (+$1f)
        ld      l,$04
        call    lb11f
        ld      l,$08
        call    lb136
        ld      a,$7f
        ld      ($f126),a
lac99:  ld      l,$42
        call    l767c
        ld      a,c
        or      a
        jr      nz,lacd4                ; (+$32)
        jr      lac99                   ; (-$0b)
laca4:  ld      c,$00
        jp      lbe72
laca9:  ld      a,($f0b7)
        cp      $10
        jr      z,lacf0                 ; (+$40)
        ld      a,($f0b7)
        ld      c,a
        sub     a
        ld      b,a
        ld      l,c
        ld      h,b
        add     hl,hl
        add     hl,hl
        ld      bc,$f160
        add     hl,bc
        ld      a,($f126)
        inc     hl
        inc     hl
        ld      (hl),a
        add     a,a
        sbc     a,a
        inc     hl
        ld      (hl),a
        dec     hl
        dec     hl
        ld      (hl),a
        dec     hl
        ld      (hl),a
        ld      a,$10
        ld      ($f0b7),a
        jr      lacf3                   ; (+$1f)
lacd4:  ld      l,$04
        call    lb136
        ld      a,($f126)
        cp      $25
        jr      z,lacf3                 ; (+$13)
        ld      a,($f126)
        ld      ($e969),a
        ld      a,$45
        ld      ($f126),a
        ld      c,$02
        jp      lbe72
lacf0:  call    l736f
lacf3:  ld      a,$7f
        ld      ($f126),a
        jr      laca4                   ; (-$56)
lacfa:  rst     $20
        push    af
        push    af
        push    af
        push    af
        ld      (ix-$07),$00
        ld      l,(ix+$04)
        ld      h,(ix+$05)
        push    hl
        ld      l,(ix+$06)
        ld      h,(ix+$07)
        push    hl
        call    lbad9
        jr      nz,lad36                ; (+$20)
        ld      hl,$f19c
        push    hl
        ld      l,(ix+$04)
        ld      h,(ix+$05)
        push    hl
        rst     $18
        pop     af
        ld      l,$05
        call    l8b1d
        ld      (ix-$08),c
        ld      a,(ix-$08)
        cp      $02
        jp      nz,lada6
        jp      lade2
lad36:  call    lae1a
        ld      hl,$f7d9
        push    hl
        ld      l,(ix+$04)
        ld      h,(ix+$05)
        ld      de,$f935
        rst     $38
        ld      hl,$f935
        push    hl
        ld      a,($f0b6)
        ld      ($f93f),a
        add     a,a
        sbc     a,a
        ld      ($f940),a
        ld      ($f93e),a
        ld      ($f93d),a
        ld      hl,$f93d
        push    hl
        call    lbdf7
        rst     $18
        pop     af
lad65:  ld      hl,$f7d9
        push    hl
        ld      de,$f935
        rst     $38
        ld      hl,$f935
        push    hl
        ld      a,($f0b6)
        ld      ($f93f),a
        add     a,a
        sbc     a,a
        ld      ($f940),a
        ld      ($f93e),a
        ld      ($f93d),a
        ld      hl,$f93d
        push    hl
        call    lba62
        rst     $18
        pop     af
        ld      hl,$f19c
        push    hl
        ld      hl,$f7d9
        push    hl
        rst     $18
        pop     af
        ld      l,$05
        call    l8b1d
        ld      (ix-$08),c
        ld      a,(ix-$08)
        cp      $02
        jr      nz,ladc8                ; (+$24)
        jr      lade2                   ; (+$3c)
lada6:  ld      a,(ix-$07)
        or      (ix-$08)
        ld      (ix-$07),a
        ld      hl,($f19a)
        ld      bc,($f198)
        ld      a,l
        xor     c
        ld      l,a
        ld      a,h
        xor     b
        ld      h,a
        ld      ($f345),hl
        sub     a
        ld      ($f343),a
        ld      ($f344),a
        jr      lae14                   ; (+$4c)
ladc8:  ld      a,(ix-$07)
        or      (ix-$08)
        ld      (ix-$07),a
        ld      a,($f19e)
        or      a
        jr      nz,lade7                ; (+$10)
        ld      l,(ix+$08)
        call    lb2ce
        ld      a,c
        cp      $02
        jr      nz,lade7                ; (+$05)
lade2:  ld      c,$02
        jp      lbe93
lade7:  ld      hl,$f198
        call    lae46
        ld      hl,$f7d9
        push    hl
        ld      l,(ix+$06)
        ld      h,(ix+$07)
        push    hl
        call    lbad9
        jp      nz,lad65
        ld      a,($f0d9)
        ld      l,a
        call    laf3d
        sub     a
        ld      ($f343),a
        ld      ($f344),a
        ld      a,c
        ld      ($f345),a
        ld      a,b
        ld      ($f346),a
lae14:  ld      c,(ix-$07)
        jp      lbe93
lae1a:  rst     $30
        ld      hl,$0040
        push    hl
        ld      hl,$f2e8
        call    lb8c3
        ld      hl,$f2e8
        ld      ($f7cf),hl
        ld      hl,$f300
        ld      ($f7d1),hl
        ld      hl,$f308
        ld      ($f7d3),hl
        ld      hl,$f314
        ld      ($f7d5),hl
        ld      hl,$f324
        ld      ($f7d7),hl
        jp      lbe72
lae46:  rst     $20
        ld      hl,($f7cf)
        push    hl
        ld      l,(ix+$04)
        ld      h,(ix+$05)
        ld      de,$f935
        rst     $38
        ld      hl,$f935
        push    hl
        ld      hl,($f7d1)
        push    hl
        call    lbe23
        ld      hl,($f7d3)
        push    hl
        call    lbe23
        ld      hl,($f7d5)
        push    hl
        call    lbe23
        ld      hl,($f7d7)
        push    hl
        call    lbe23
        rst     $18
        pop     af
        ld      hl,$f2e8
        ld      a,($f7cf)
        cp      l
        jr      nz,lae84                ; (+$04)
        ld      a,($f7d0)
        cp      h
lae84:  jr      z,lae98                 ; (+$12)
        ld      a,($f7cf)
        sub     $04
        ld      ($f7cf),a
        ld      a,($f7d0)
        sbc     a,$00
        ld      ($f7d0),a
        jr      lae9e                   ; (+$06)
lae98:  ld      hl,$f324
        ld      ($f7cf),hl
lae9e:  ld      hl,$f2e8
        ld      a,($f7d1)
        cp      l
        jr      nz,laeab                ; (+$04)
        ld      a,($f7d2)
        cp      h
laeab:  jr      z,laebf                 ; (+$12)
        ld      a,($f7d1)
        sub     $04
        ld      ($f7d1),a
        ld      a,($f7d2)
        sbc     a,$00
        ld      ($f7d2),a
        jr      laec5                   ; (+$06)
laebf:  ld      hl,$f324
        ld      ($f7d1),hl
laec5:  ld      hl,$f2e8
        ld      a,($f7d3)
        cp      l
        jr      nz,laed2                ; (+$04)
        ld      a,($f7d4)
        cp      h
laed2:  jr      z,laee6                 ; (+$12)
        ld      a,($f7d3)
        sub     $04
        ld      ($f7d3),a
        ld      a,($f7d4)
        sbc     a,$00
        ld      ($f7d4),a
        jr      laeec                   ; (+$06)
laee6:  ld      hl,$f324
        ld      ($f7d3),hl
laeec:  ld      hl,$f2e8
        ld      a,($f7d5)
        cp      l
        jr      nz,laef9                ; (+$04)
        ld      a,($f7d6)
        cp      h
laef9:  jr      z,laf0d                 ; (+$12)
        ld      a,($f7d5)
        sub     $04
        ld      ($f7d5),a
        ld      a,($f7d6)
        sbc     a,$00
        ld      ($f7d6),a
        jr      laf13                   ; (+$06)
laf0d:  ld      hl,$f324
        ld      ($f7d5),hl
laf13:  ld      hl,$f2e8
        ld      a,($f7d7)
        cp      l
        jr      nz,laf20                ; (+$04)
        ld      a,($f7d8)
        cp      h
laf20:  jr      z,laf34                 ; (+$12)
        ld      a,($f7d7)
        sub     $04
        ld      ($f7d7),a
        ld      a,($f7d8)
        sbc     a,$00
        ld      ($f7d8),a
        jr      laf3a                   ; (+$06)
laf34:  ld      hl,$f324
        ld      ($f7d7),hl
laf3a:  jp      lbe84
laf3d:  rst     $20
        ld      hl,$fff9
        add     hl,sp
        ld      sp,hl
        sub     a
        ld      ($f7df),a
        ld      ($f7e0),a
        ld      hl,$f2e8
        ld      ($f7e1),hl
laf50:  ld      hl,lf328
        ld      a,($f7e1)
        sub     l
        ld      a,($f7e2)
        sbc     a,h
        jp      nc,lafe4
        ld      (ix-$07),$00
laf62:  ld      a,(ix-$07)
        cp      (ix+$04)
        jp      p,lafeb
        ld      hl,($f7df)
        push    hl
        ld      hl,$0006
        push    hl
        call    lba01
        pop     hl
        ld      e,l
        ld      hl,($f7e1)
        inc     hl
        inc     hl
        ld      a,(hl)
        xor     e
        ld      l,a
        push    hl
        ld      hl,($f7df)
        push    hl
        ld      hl,l0008
        push    hl
        call    lba01
        pop     hl
        ld      e,l
        pop     hl
        ld      a,l
        xor     e
        ld      l,a
        push    hl
        ld      hl,($f7df)
        push    hl
        ld      hl,$000b
        push    hl
        call    lba01
        pop     hl
        ld      e,l
        pop     hl
        ld      a,l
        xor     e
        ld      l,a
        push    hl
        ld      hl,($f7df)
        push    hl
        ld      hl,$000f
        push    hl
        call    lba01
        pop     hl
        ld      e,l
        pop     hl
        ld      a,l
        xor     e
        and     $01
        ld      l,a
        ld      e,a
        add     a,a
        sbc     a,a
        ld      d,a
        ld      hl,($f7df)
        add     hl,hl
        ld      a,l
        or      e
        ld      l,a
        ld      a,h
        or      d
        ld      h,a
        ld      ($f7df),hl
        ld      hl,($f7e1)
        push    hl
        ld      de,$f935
        rst     $38
        ld      hl,$f935
        push    hl
        ld      hl,$0001
        push    hl
        call    lbd0f
        rst     $18
        pop     af
        inc     (ix-$07)
        jp      laf62
lafe4:  ld      bc,($f7df)
        jp      lbe84
lafeb:  ld      hl,($f7e1)
        inc     hl
        inc     hl
        inc     hl
        inc     hl
        ld      ($f7e1),hl
        jp      laf50
laff8:  rst     $20
        ld      l,(ix+$06)
        ld      h,(ix+$07)
        push    hl
        ld      l,(ix+$04)
        ld      h,(ix+$05)
        ld      bc,$0012
        add     hl,bc
        ld      bc,$ffff
        add     hl,bc
        push    hl
        ld      l,(ix+$04)
        ld      h,(ix+$05)
        call    l9ad7
        jp      lbe8b
lb01b:  rst     $20
        ld      l,(ix+$04)
        ld      h,(ix+$05)
        push    hl
        ld      hl,$0012
        push    hl
        call    lba2d
        pop     hl
        ld      bc,$e9ae
        add     hl,bc
        push    hl
        ld      a,($f13e)
        ld      c,a
        add     a,a
        sbc     a,a
        ld      b,a
        push    bc
        ld      hl,$0012
        push    hl
        call    lba2d
        pop     hl
        ld      bc,$e9ae
        add     hl,bc
        ld      bc,$ffff
        add     hl,bc
        push    hl
        ld      l,(ix+$04)
        ld      h,(ix+$05)
        push    hl
        ld      hl,$0012
        push    hl
        call    lba2d
        pop     hl
        ld      bc,$e9c0
        add     hl,bc
        call    l9ad7
        ld      a,($f13e)
        sub     $01
        ld      ($f13e),a
        jp      lbe84
lb06a:  rst     $20
        ld      hl,$fff9
        add     hl,sp
        ld      sp,hl
lb070:  ld      (ix-$07),$00
        ld      l,(ix+$04)
        ld      h,(ix+$05)
        push    hl
        ld      hl,$0012
        push    hl
        call    lba2d
        pop     hl
        ld      bc,$e9ae
        add     hl,bc
        ld      ($f7e7),hl
        ld      l,(ix+$04)
        ld      h,(ix+$05)
        inc     hl
        ld      ($f7e5),hl
lb094:  ld      a,($f13e)
        ld      e,a
        add     a,a
        sbc     a,a
        ld      d,a
        ld      a,($f7e5)
        sub     e
        ld      a,($f7e6)
        sbc     a,d
        jp      p,lb105
        ld      hl,($f7e7)
        ld      ($f7e3),hl
        ld      hl,($f7e5)
        push    hl
        ld      hl,$0012
        push    hl
        call    lba2d
        pop     hl
        ld      bc,$e9ae
        add     hl,bc
        ld      ($f7e7),hl
        ld      hl,($f7e3)
        ld      bc,l0008
        add     hl,bc
        push    hl
        ld      hl,($f7e7)
        ld      bc,l0008
        add     hl,bc
        pop     bc
        ld      a,(bc)
        cp      (hl)
        jp      m,lb115
        ld      hl,($f7e7)
        push    hl
        ld      hl,($f7e3)
        push    hl
        call    lbab0
        jr      nc,lb115                ; (+$34)
        ld      (ix-$07),$01
        ld      hl,$f7e9
        push    hl
        ld      hl,($f7e3)
        call    laff8
        ld      hl,($f7e3)
        push    hl
        ld      hl,($f7e7)
        call    laff8
        ld      hl,($f7e7)
        push    hl
        ld      hl,$f7e9
        call    laff8
        jr      lb115                   ; (+$10)
lb105:  ld      l,$81
        call    lba5c
        ld      a,(ix-$07)
        cp      $01
        jp      z,lb070
        jp      lbe84
lb115:  ld      hl,($f7e5)
        inc     hl
        ld      ($f7e5),hl
        jp      lb094
lb11f:  rst     $20
        ld      l,(ix+$04)
        ld      a,l
        or      $40
        ld      l,a
        call    lb54c
        ld      a,($f134)
        or      (ix+$04)
        ld      ($f134),a
        jp      lbe84
lb136:  rst     $20
        ld      l,(ix+$04)
        ld      a,l
        or      $a0
        ld      l,a
        call    lb54c
        ld      l,(ix+$04)
        ld      a,l
        cpl     
        ld      l,a
        ld      a,($f134)
        and     l
        ld      ($f134),a
        jp      lbe84
lb151:  rst     $20
        ld      l,$bf
        call    lb54c
        ld      a,(ix+$04)
        ld      ($f134),a
        or      $40
        ld      l,a
        call    lb54c
        jp      lbe84
        inc     bc
        dec     h
        jr      z,lb190                 ; (+$26)
        add     a,l
        or      d
        ld      a,e
        or      d
        ld      (hl),l
        or      d
        ld      (hl),d
        or      d
        dec     b
        dec     e
        dec     h
        inc     e
        daa     
        ld      h,$a6
        or      d
        and     h
        or      d
        inc     a
        or      d
        inc     a
        or      d
        ld      a,($12b2)
        or      d
lb184:  rst     $20
        ld      hl,$ffc3
        add     hl,sp
        ld      sp,hl
        ld      a,($f140)
        ld      (ix-$0c),a
lb190:  ld      a,($f1a0)
        ld      (ix-$0d),a
        ld      a,($f134)
        ld      (ix-$07),a
        ld      l,(ix-$07)
        bit     0,l
        jr      z,lb1a7                 ; (+$04)
        sub     a
        ld      ($f1a0),a
lb1a7:  push    ix
        pop     bc
        ld      hl,$ffc3
        add     hl,bc
        call    l81ba
        ld      a,$01
        ld      ($f140),a
        ld      (ix-$0b),$01
        ld      (ix-$09),$01
        ld      (ix-$08),$0a
lb1c2:  ld      l,$08
        call    lb136
        ld      l,$04
        call    lb11f
        ld      a,($f115)
        or      a
        jr      nz,lb1e5                ; (+$13)
        ld      a,$01
        ld      ($f0cb),a
        ld      l,$00
        call    l767c
        ld      a,c
        or      a
        jr      nz,lb1e5                ; (+$05)
        ld      a,$25
        ld      ($f126),a
lb1e5:  ld      l,(ix-$0b)
        ld      c,(ix+$06)
        ld      b,(ix+$07)
        call    lb91e
        sub     a
        ld      ($f0cb),a
        ld      l,(ix-$08)
        call    l7395
        ld      (ix-$0b),$00
        ld      (ix-$08),$10
        ld      l,$04
        call    lb136
        ld      a,($f127)
        ld      c,a
        ld      hl,$b172
        jp      lb8ed
lb212:  ld      l,(ix-$07)
        call    lb151
        ld      l,$71
        rst     $08
        push    ix
        pop     bc
        ld      hl,$ffc3
        add     hl,bc
        call    l8623
        call    l7fb4
        ld      a,c
        cp      $66
        jp      z,lb2a8
        call    l7fb4
        ld      a,c
        cp      $69
        jp      nz,lb2b4
        jp      lb2a8
        jr      lb212                   ; (-$2a)
        ld      l,$08
        call    lb11f
lb241:  ld      l,(ix+$04)
        ld      h,(ix+$05)
        call    lbe71
        ld      (ix-$0a),c
        ld      a,(ix-$0a)
        cp      $02
        jr      z,lb25a                 ; (+$06)
        ld      a,(ix-$0a)
        ld      (ix-$09),a
lb25a:  ld      l,$0c
        call    l767c
        ld      a,c
        or      a
        jr      z,lb241                 ; (-$22)
        ld      l,$0c
        call    l7395
        ld      a,($f127)
        ld      c,a
        ld      hl,$b166
        jp      lb8ed
        jp      lb212
        jp      lb1c2
        jp      lb1c2
lb27b:  call    lb8e6
        ld      (ix-$09),$02
        jp      lb212
lb285:  call    lb8e6
        ld      a,($f126)
        cp      $45
        jr      z,lb2c9                 ; (+$3a)
        ld      a,$01
        ld      ($f1a0),a
        ld      a,($f126)
        ld      ($e969),a
        ld      a,$45
        ld      ($f126),a
        jr      lb2c9                   ; (+$28)
        jp      lb1c2
        jr      lb27b                   ; (-$2b)
        jr      lb285                   ; (-$23)
lb2a8:  ld      a,$78
        ld      ($f13d),a
        ld      l,a
        push    hl
        ld      l,$ff
        call    l7f65
lb2b4:  ld      l,$72
        rst     $08
        ld      a,(ix-$0c)
        ld      ($f140),a
        ld      a,(ix-$0d)
        ld      ($f1a0),a
        ld      c,(ix-$09)
        jp      lbe8b
lb2c9:  ld      c,$02
        jp      lbe8b
lb2ce:  rst     $20
        ld      hl,$fff9
        add     hl,sp
        ld      sp,hl
        ld      a,($f140)
        cp      $03
        jr      nz,lb30e                ; (+$33)
        ld      l,$17
        call    l767c
        ld      a,c
        or      a
        jr      z,lb309                 ; (+$25)
        ld      a,($f134)
        and     $08
        jr      z,lb304                 ; (+$19)
        ld      a,($f126)
        cp      $28
        jr      z,lb300                 ; (+$0e)
        ld      a,($f126)
        cp      $25
        jr      nz,lb304                ; (+$0b)
        ld      a,($f0b7)
        cp      $10
        jr      nz,lb304                ; (+$04)
lb300:  ld      c,$02
        jr      lb307                   ; (+$03)
lb304:  call    lac79
lb307:  jr      lb30b                   ; (+$02)
lb309:  ld      c,$00
lb30b:  jp      lbe84
lb30e:  ld      a,(ix+$04)
        or      a
        jr      z,lb318                 ; (+$04)
        ld      c,$0d
        jr      lb31a                   ; (+$02)
lb318:  ld      c,$00
lb31a:  ld      (ix-$07),c
        ld      l,(ix-$07)
        call    l767c
        ld      a,c
        or      a
        jr      z,lb33a                 ; (+$13)
        ld      a,($f126)
        cp      $27
        jr      nz,lb33f                ; (+$11)
        ld      a,($f134)
        and     $08
        jr      z,lb344                 ; (+$0f)
        call    l736f
        jr      lb349                   ; (+$0f)
lb33a:  ld      c,$00
        jp      lbe84
lb33f:  ld      c,$02
        jp      lbe84
lb344:  ld      l,$08
        call    lb11f
lb349:  ld      a,$7f
        ld      ($f126),a
        ld      c,$00
        jp      lbe84
lb353:  rst     $20
        ld      hl,$0100
        push    hl
        ld      hl,$f822
        call    lb8b6
        ld      l,$00
        push    hl
        ld      l,(ix+$04)
        ld      h,(ix+$05)
        call    lb66a
        ld      l,c
        ld      h,b
        ld      ($f927),hl
        ld      a,l
        sub     (ix+$04)
        ld      l,a
        ld      a,h
        sbc     a,(ix+$05)
        ld      h,a
        ld      bc,$f822
        add     hl,bc
        ld      ($f923),hl
        ld      hl,$f822
        ld      a,($f923)
        cp      l
        jr      nz,lb38d                ; (+$04)
        ld      a,($f924)
        cp      h
lb38d:  jr      nz,lb3ab                ; (+$1c)
        ld      hl,$f822
        ld      ($f820),hl
        ld      bc,l0020
        add     hl,bc
        ld      bc,$ffff
        add     hl,bc
        ld      ($f81e),hl
        ld      hl,$f842
        ld      ($f923),hl
        ld      (hl),$00
        jp      lb431
lb3ab:  ld      hl,$f822
        push    hl
        ld      hl,($f927)
        push    hl
        ld      l,(ix+$04)
        ld      h,(ix+$05)
        call    l9ad7
        ld      a,(ix+$06)
        or      a
        jr      z,lb3f6                 ; (+$34)
        ld      hl,($f923)
        ld      bc,$ffff
        add     hl,bc
        ld      ($f81e),hl
        ld      hl,($f923)
        ld      bc,$f822
        ld      a,l
        sub     c
        ld      l,a
        ld      a,h
        sbc     a,b
        ld      h,a
        ld      a,$20
        sub     l
        ld      a,$00
        sbc     a,h
        jr      nc,lb3ec                ; (+$0c)
        ld      bc,($f923)
        ld      hl,$ffe0
        add     hl,bc
        ld      c,l
        ld      b,h
        jr      lb3ef                   ; (+$03)
lb3ec:  ld      bc,$f822
lb3ef:  ld      l,c
        ld      h,b
        ld      ($f820),hl
        jr      lb431                   ; (+$3b)
lb3f6:  ld      hl,$f822
        ld      ($f820),hl
        ld      hl,($f923)
        ld      bc,$f822
        ld      a,l
        sub     c
        ld      l,a
        ld      a,h
        sbc     a,b
        ld      h,a
        ld      a,$20
        sub     l
        ld      a,$00
        sbc     a,h
        jr      nc,lb422                ; (+$12)
        ld      bc,($f820)
        ld      hl,l0020
        add     hl,bc
        ld      c,l
        ld      b,h
        ld      hl,$ffff
        add     hl,bc
        ld      c,l
        ld      b,h
        jr      lb42c                   ; (+$0a)
lb422:  ld      bc,($f923)
        ld      hl,$ffff
        add     hl,bc
        ld      c,l
        ld      b,h
lb42c:  ld      l,c
        ld      h,b
        ld      ($f81e),hl
lb431:  ld      hl,($f81e)
        push    hl
        ld      hl,($f820)
        call    lb43e
        jp      lbe8b
lb43e:  rst     $20
        sub     a
        ld      ($f7fb),a
        ld      l,(ix+$04)
        ld      h,(ix+$05)
        ld      ($f929),hl
        ld      hl,$f7fc
        ld      ($f92b),hl
lb452:  ld      hl,($f929)
        ld      bc,($f92b)
        ld      a,(bc)
        ld      c,a
        ld      a,(hl)
        cp      c
        jr      z,lb46a                 ; (+$0b)
        ld      hl,($f92b)
        push    hl
        ld      hl,($f929)
        ld      l,(hl)
        call    lb4b7
lb46a:  ld      hl,($f92b)
        inc     hl
        ld      ($f92b),hl
        ld      a,($f929)
        cp      (ix+$06)
        jr      nz,lb47f                ; (+$06)
        ld      a,($f92a)
        cp      (ix+$07)
lb47f:  jr      nz,lb4a1                ; (+$20)
lb481:  ld      hl,$f81c
        ld      a,($f92b)
        sub     l
        ld      a,($f92c)
        sbc     a,h
        jr      nc,lb4ab                ; (+$1d)
        ld      hl,($f92b)
        ld      a,(hl)
        cp      $20
        jr      z,lb4ae                 ; (+$18)
        ld      hl,($f92b)
        push    hl
        ld      l,$20
        call    lb4b7
        jr      lb4ae                   ; (+$0d)
lb4a1:  ld      hl,($f929)
        inc     hl
        ld      ($f929),hl
        jp      lb452
lb4ab:  jp      lbe8b
lb4ae:  ld      hl,($f92b)
        inc     hl
        ld      ($f92b),hl
        jr      lb481                   ; (-$36)
lb4b7:  rst     $20
        ld      l,(ix+$06)
        ld      h,(ix+$07)
        ld      bc,$f7fc
        ld      a,l
        sub     c
        ld      l,a
        ld      a,h
        sbc     a,b
        ld      h,a
        ld      ($f92d),hl
        ld      a,($f7fb)
        or      a
        jr      nz,lb4e0                ; (+$10)
        ld      l,(ix+$06)
        ld      h,(ix+$07)
        ld      a,(hl)
        cp      $5f
        jr      nz,lb4e0                ; (+$05)
        ld      l,$80
        call    lb54c
lb4e0:  ld      hl,$f81c
        ld      a,($f92d)
        cp      (hl)
        jr      nz,lb4ee                ; (+$05)
        ld      a,($f92e)
        inc     hl
        cp      (hl)
lb4ee:  jr      z,lb4fd                 ; (+$0d)
        ld      hl,($f92d)
        ld      ($f81c),hl
        ld      a,l
        or      $20
        ld      l,a
        call    lb54c
lb4fd:  ld      l,$81
        call    lba5c
        bit     1,c
        jr      nz,lb4fd                ; (-$09)
        ld      l,(ix+$06)
        ld      h,(ix+$07)
        ld      a,(ix+$04)
        ld      (hl),a
        ld      l,(hl)
        push    hl
        ld      l,$80
        call    lbe62
        ld      a,(ix+$04)
        cp      $5f
        jr      nz,lb52d                ; (+$0f)
        ld      a,$01
        ld      ($f7fb),a
        ld      hl,($f92d)
        ld      a,l
        or      $60
        ld      l,a
        call    lb54c
lb52d:  ld      a,($f81c)
        sub     $1f
        ld      a,($f81d)
        sbc     a,$00
        jp      p,lb541
        ld      bc,($f81c)
        inc     bc
        jr      lb544                   ; (+$03)
lb541:  ld      bc,l0000
lb544:  ld      l,c
        ld      h,b
        ld      ($f81c),hl
        jp      lbe8b
lb54c:  rst     $20
lb54d:  ld      l,$81
        call    lba5c
        bit     1,c
        jr      nz,lb54d                ; (-$09)
        ld      l,(ix+$04)
        push    hl
        ld      l,$81
        call    lbe62
        ld      a,(ix+$04)
        cp      $e0
        jr      z,lb56d                 ; (+$07)
        ld      a,(ix+$04)
        cp      $c0
        jr      nz,lb57f                ; (+$12)
lb56d:  ld      a,(ix+$04)
        cp      $c0
        jr      nz,lb5a7                ; (+$33)
lb574:  ld      l,$81
        call    lba5c
        bit     1,c
        jr      z,lb5bb                 ; (+$3e)
        jr      lb574                   ; (-$0b)
lb57f:  ld      a,(ix+$04)
        ld      e,a
        add     a,a
        sbc     a,a
        ld      d,a
        ld      a,e
        and     $e0
        ld      e,a
        sub     a
        ld      d,a
        ld      a,e
        cp      $20
        jr      nz,lb594                ; (+$03)
        ld      a,d
        cp      $00
lb594:  jr      nz,lb5b8                ; (+$22)
        ld      l,(ix+$04)
        ld      a,l
        and     $1f
        ld      l,a
        ld      ($f81c),a
        add     a,a
        sbc     a,a
        ld      ($f81d),a
        jr      lb5b8                   ; (+$11)
lb5a7:  ld      hl,l0020
        push    hl
        ld      hl,$f7fc
        call    lb8b6
        sub     a
        ld      ($f81c),a
        ld      ($f81d),a
lb5b8:  jp      lbe84
lb5bb:  ld      l,$80
        push    hl
        ld      l,$81
        call    lbe62
        jr      lb5a7                   ; (-$1e)
lb5c5:  rst     $30
        ld      hl,($f923)
        ld      bc,$ffff
        add     hl,bc
        ld      ($f92f),hl
        ld      hl,$f92f
        ld      a,($f81e)
        sub     (hl)
        ld      a,($f81f)
        inc     hl
        sbc     a,(hl)
        jr      nc,lb61a                ; (+$3c)
        ld      hl,($f92f)
        ld      bc,$fff8
        add     hl,bc
        ld      a,($f81e)
        sub     l
        ld      a,($f81f)
        sbc     a,h
        jr      c,lb5f5                 ; (+$06)
        ld      bc,($f92f)
        jr      lb5ff                   ; (+$0a)
lb5f5:  ld      bc,($f81e)
        ld      hl,l0008
        add     hl,bc
        ld      c,l
        ld      b,h
lb5ff:  ld      l,c
        ld      h,b
        ld      ($f81e),hl
        ld      bc,$ffe1
        add     hl,bc
        ld      ($f820),hl
        ld      hl,($f81e)
        push    hl
        ld      hl,($f820)
        call    lb43e
        ld      c,$01
        jp      lbe72
lb61a:  ld      c,$00
        jp      lbe72
lb61f:  rst     $30
        ld      hl,$f822
        ld      bc,($f820)
        ld      a,l
        sub     c
        ld      a,h
        sbc     a,b
        jr      nc,lb665                ; (+$38)
        ld      hl,$f82a
        ld      bc,($f820)
        ld      a,l
        sub     c
        ld      a,h
        sbc     a,b
        jr      c,lb63f                 ; (+$05)
        ld      bc,$f822
        jr      lb649                   ; (+$0a)
lb63f:  ld      bc,($f820)
        ld      hl,$fff8
        add     hl,bc
        ld      c,l
        ld      b,h
lb649:  ld      l,c
        ld      h,b
        ld      ($f820),hl
        ld      bc,l0020
        add     hl,bc
        ld      bc,$ffff
        add     hl,bc
        ld      ($f81e),hl
        push    hl
        ld      hl,($f820)
        call    lb43e
        ld      c,$01
        jp      lbe72
lb665:  ld      c,$00
        jp      lbe72
lb66a:  pop     de
        pop     bc
        ld      a,c
        ld      bc,l0000
        cpir    
        dec     hl
        ld      c,l
        ld      b,h
        ex      de,hl
        jp      (hl)
        push    af
        rrca    
        ret     p

        rrca    
        ret     p

        ret     p

        rrca    
        rrca    
        ret     p

        ld      d,b
        ld      c,a
        ld      b,h
        jr      nz,lb6d8                ; (+$53)
        ld      b,l
        ld      c,h
        ld      b,(hl)
        dec     l
        ld      d,h
        ld      b,l
        ld      d,e
        ld      d,h
        jr      nz,lb68f                ; (+$00)
lb68f:  rst     $30
        ld      hl,$fff7
        add     hl,sp
        ld      sp,hl
        ld      l,$08
        call    lb11f
        ld      a,$01
        ld      ($f140),a
lb69f:  ld      l,$72
        rst     $08
        ld      l,$00
        call    l767c
        ld      a,c
        or      a
        jr      z,lb6b1                 ; (+$06)
        call    l9513
        jp      lb743
lb6b1:  ld      l,$71
        rst     $08
        ld      l,$58
        rst     $08
        ld      hl,$b680
        rst     $28
        ld      (ix-$07),$00
        ld      l,$00
        call    l947f
        ld      a,c
        cp      $02
        jp      z,lb74e
        ld      hl,$f157
        rst     $28
        ld      l,$63
        rst     $10
        ld      l,$00
        call    l92a2
        ld      l,$05
lb6d8:  push    hl
        ld      hl,$b677
        call    l9385
        ld      a,c
        or      a
        jr      z,lb6f7                 ; (+$14)
        ld      l,$01
        call    l92a2
        ld      a,($f0d8)
        ld      l,a
        push    hl
        ld      hl,$f931
        call    l92be
        ld      a,c
        or      a
        jr      nz,lb712                ; (+$1b)
lb6f7:  ld      l,$69
        rst     $10
        ld      l,$63
        rst     $10
        ld      a,(ix-$07)
        ld      ($f0c7),a
        ld      l,$02
        push    hl
        ld      l,$10
        push    hl
        ld      hl,$f0c5
        call    l7fc5
        jp      lb69f
lb712:  push    ix
        pop     bc
        ld      hl,$fff7
        add     hl,bc
        call    l92f6
        ld      a,c
        or      a
        jr      z,lb6f7                 ; (-$29)
        ld      l,(ix-$09)
        bit     6,l
        jr      nz,lb733                ; (+$0c)
        ld      l,$00
        call    l947f
        ld      a,c
        cp      $02
        jr      nz,lb73e                ; (+$0d)
        jr      lb74e                   ; (+$1b)
lb733:  ld      l,(ix-$09)
        ld      a,l
        and     $87
        jr      z,lb754                 ; (+$19)
        jp      lb6f7
lb73e:  ld      a,$28
        ld      ($f126),a
lb743:  ld      a,($f126)
        ld      ($e969),a
        ld      a,$45
        ld      ($f126),a
lb74e:  ld      l,$72
        rst     $08
        jp      lbe72
lb754:  sub     a
        ld      ($f33f),a
        ld      ($f340),a
        ld      ($f341),a
        ld      ($f342),a
        ld      (ix-$08),$00
lb765:  ld      hl,$f0d8
        ld      a,(ix-$08)
        cp      (hl)
        jp      p,lb7ac
        ld      hl,$f33f
        push    hl
        ld      de,$f935
        rst     $38
        ld      hl,$f935
        push    hl
        ld      hl,l0008
        push    hl
        call    lbcb2
        ld      hl,$f931
        ld      a,(ix-$08)
        ld      e,a
        add     a,a
        sbc     a,a
        ld      d,a
        add     hl,de
        ld      c,l
        ld      b,h
        ld      a,(bc)
        ld      ($f93f),a
        add     a,a
        sbc     a,a
        ld      ($f940),a
        ld      ($f93e),a
        ld      ($f93d),a
        ld      hl,$f93d
        push    hl
        call    lba62
        rst     $18
        pop     af
        inc     (ix-$08)
        jr      lb765                   ; (-$47)
lb7ac:  ld      hl,$f33f
        ld      de,$f935
        rst     $38
        ld      hl,$f935
        push    hl
        ld      hl,$b67c
        push    hl
        call    lbe23
        ld      hl,$f0d4
        push    hl
        call    lba8d
        pop     hl
        ld      a,(hl)
        inc     hl
        or      (hl)
        inc     hl
        or      (hl)
        inc     hl
        or      (hl)
        jp      nz,lb6f7
        inc     (ix-$07)
        ld      l,$00
        call    l92a2
        ld      l,$03
        call    l93be
        ld      a,c
        or      a
        jp      z,lb6f7
        ld      (ix-$08),$00
lb7e6:  ld      hl,$f0d8
        ld      a,(ix-$08)
        cp      (hl)
        jp      p,lb808
        ld      hl,$f931
        ld      a,(ix-$08)
        ld      e,a
        add     a,a
        sbc     a,a
        ld      d,a
        add     hl,de
        ld      a,(hl)
        cpl     
        ld      l,a
        call    l93be
        ld      a,c
        or      a
        jr      nz,lb827                ; (+$22)
        jp      lb6f7
lb808:  ld      l,$01
        call    l92a2
        push    ix
        pop     bc
        ld      hl,$fff7
        add     hl,bc
        call    l92f6
        ld      a,c
        or      a
        jp      z,lb6f7
        ld      l,(ix-$09)
        ld      a,l
        and     $87
        jr      z,lb82c                 ; (+$08)
        jp      lb6f7
lb827:  inc     (ix-$08)
        jr      lb7e6                   ; (-$46)
lb82c:  inc     (ix-$07)
        ld      l,$00
        call    l92a2
        ld      l,$04
        call    l93be
        ld      a,c
        or      a
        jp      z,lb6f7
        ld      l,$01
        call    l92a2
        ld      (ix-$08),$00
lb847:  ld      a,(ix-$08)
        cp      $02
        jp      p,lb863
        ld      hl,$f931
        call    l92f6
        ld      a,c
        or      a
        jp      z,lb6f7
        ld      a,($f931)
        or      a
        jr      z,lb87d                 ; (+$1d)
        jp      lb6f7
lb863:  push    ix
        pop     bc
        ld      hl,$fff7
        add     hl,bc
        call    l92f6
        ld      a,c
        or      a
        jp      z,lb6f7
        ld      l,(ix-$09)
        ld      a,l
        and     $87
        jr      z,lb882                 ; (+$08)
        jp      lb6f7
lb87d:  inc     (ix-$08)
        jr      lb847                   ; (-$3b)
lb882:  inc     (ix-$07)
        ld      l,$00
        call    l92a2
        ld      l,$06
        call    l93be
        ld      a,c
        or      a
        jp      z,lb6f7
        ld      a,($f0da)
        ld      l,a
        call    l93be
        ld      a,c
        or      a
        jp      z,lb6f7
        ld      l,$01
        call    l92a2
        ld      hl,$f931
        call    l92f6
        ld      a,c
        or      a
        jp      nz,lb6f7
        ld      l,$66
        rst     $10
        jp      lb69f
lb8b6:  pop     de
        pop     bc
        push    de
        ld      a,$20
        ld      (hl),a
        ld      e,l
        ld      d,h
        inc     de
        dec     bc
        ldir    
        ret     

lb8c3:  pop     de
        pop     bc
        push    de
        ld      a,$00
        ld      (hl),a
        ld      e,l
        ld      d,h
        inc     de
        dec     bc
        ldir    
        ret     

lb8d0:  rst     $30
        ld      a,($f0be)
        or      a
        jr      z,lb8da                 ; (+$03)
        call    l736f
lb8da:  jp      lbe72
lb8dd:  rst     $30
        call    l9513
        ld      c,$00
        jp      lbe72
lb8e6:  ld      a,($f127)
        ld      ($f126),a
        ret     

lb8ed:  ld      a,c
        ld      b,$00
        ld      c,(hl)
        inc     hl
        push    bc
        push    hl
        cpir    
        jr      z,lb8f9                 ; (+$01)
        dec     bc
lb8f9:  pop     hl
        inc     bc
        add     hl,bc
        add     hl,bc
        pop     bc
        add     hl,bc
        ld      a,(hl)
        inc     hl
        ld      h,(hl)
        ld      l,a
        jp      (hl)
        ld      de,$f93d
        jp      lb90d
        ld      de,$f935
lb90d:  ldi     
        ldi     
        ldi     
        ldi     
lb915:  ldi     
        ldi     
        ldi     
        ldi     
        ret     

lb91e:  push    bc
        ret     

lb920:  push    hl
        push    bc
        push    de
        ld      e,$00
        ld      hl,$0009
        add     hl,sp
        call    lb97c
        ld      hl,$000b
        add     hl,sp
        call    lb97c
lb933:  call    lb98a
        jr      nc,lb93f                ; (+$07)
        sub     a
        sub     c
        ld      c,a
        ld      a,$00
        sbc     a,b
        ld      b,a
lb93f:  ld      (hl),c
        inc     hl
        ld      (hl),b
        pop     de
        jp      lbed5
        push    hl
        push    bc
        push    de
        ld      hl,$0009
        add     hl,sp
        call    lb97c
        ld      e,$00
        ld      hl,$000b
        add     hl,sp
        call    lb97c
lb959:  call    lb98a
        jr      nc,lb965                ; (+$07)
        sub     a
        sub     e
        ld      e,a
        ld      a,$00
        sbc     a,d
        ld      d,a
lb965:  ld      (hl),e
        inc     hl
        ld      (hl),d
        pop     de
        jp      lbed5
lb96c:  push    hl
        push    bc
        push    de
        ld      e,$00
        jp      lb933
        push    hl
        push    bc
        push    de
        ld      e,$00
        jp      lb959
lb97c:  ld      a,(hl)
        or      a
        ret     p

        sub     a
        dec     hl
        sub     (hl)
        ld      (hl),a
        ld      a,$00
        inc     hl
        sbc     a,(hl)
        ld      (hl),a
        inc     e
        ret     

lb98a:  push    de
        ld      de,l0000
        ld      hl,$000c
        add     hl,sp
        ld      c,(hl)
        inc     hl
        ld      b,(hl)
        inc     hl
        ld      a,(hl)
        inc     hl
        ld      h,(hl)
        ld      l,a
        ld      a,$10
        push    af
lb99d:  pop     af
        dec     a
        jp      m,lb9b6
        push    af
        add     hl,hl
        rl      e
        rl      d
        ld      a,e
        sub     c
        ld      a,d
        sbc     a,b
        jr      c,lb99d                 ; (-$11)
        ld      d,a
        ld      a,e
        sub     c
        ld      e,a
        inc     l
        jp      lb99d
lb9b6:  ld      c,l
        ld      b,h
        ld      hl,$000e
        add     hl,sp
        pop     af
        ret     

lb9be:  push    hl
        push    bc
        ld      hl,$0006
        add     hl,sp
        ld      a,(hl)
        or      a
        jp      p,lb9ce
        cpl     
        inc     a
        jp      lb9ee
lb9ce:  jp      z,lbed5
        ld      b,a
        inc     hl
        inc     hl
        ld      a,(hl)
        inc     hl
        ld      h,(hl)
        ld      l,a
lb9d8:  add     hl,hl
        djnz    lb9d8                   ; (-$03)
        jp      lba21
lb9de:  push    hl
        push    bc
        ld      hl,$0006
        add     hl,sp
        ld      a,(hl)
        or      a
        jp      p,lb9ee
        cpl     
        inc     a
        jp      lb9ce
lb9ee:  jp      z,lbed5
        ld      b,a
        inc     hl
        inc     hl
        ld      a,(hl)
        inc     hl
        ld      h,(hl)
        ld      l,a
lb9f8:  sra     h
        rr      l
        djnz    lb9f8                   ; (-$06)
        jp      lba21
lba01:  push    hl
        push    bc
        ld      hl,$0006
        add     hl,sp
        ld      a,(hl)
        or      a
        jp      p,lba11
        cpl     
        inc     a
        jp      lb9ce
lba11:  jp      z,lbed5
        ld      b,a
        inc     hl
        inc     hl
        ld      a,(hl)
        inc     hl
        ld      h,(hl)
        ld      l,a
lba1b:  srl     h
        rr      l
        djnz    lba1b                   ; (-$06)
lba21:  ld      c,l
        ld      b,h
        ld      hl,l0008
        add     hl,sp
        ld      (hl),c
        inc     hl
        ld      (hl),b
        jp      lbed5
lba2d:  push    hl
        push    bc
        push    de
        ld      hl,l0008
        add     hl,sp
        ld      c,(hl)
        inc     hl
        ld      b,(hl)
        inc     hl
        ld      e,(hl)
        inc     hl
        ld      d,(hl)
        ld      hl,l0000
lba3e:  ld      a,b
        or      c
        jr      z,lba50                 ; (+$0e)
        srl     b
        rr      c
        jr      nc,lba49                ; (+$01)
        add     hl,de
lba49:  sla     e
        rl      d
        jp      lba3e
lba50:  ex      de,hl
        ld      hl,$000a
        add     hl,sp
        ld      (hl),e
        inc     hl
        ld      (hl),d
        pop     de
        jp      lbed5
lba5c:  ld      c,l
        in      c,(c)
        ld      b,$00
        ret     

lba62:  push    hl
        push    bc
        ld      hl,$0006
        add     hl,sp
        ld      c,(hl)
        inc     hl
        ld      b,(hl)
        inc     hl
        ld      a,(hl)
        inc     hl
        ld      h,(hl)
        ld      l,a
        inc     bc
        inc     bc
        ld      a,(bc)
        inc     hl
        inc     hl
        add     a,(hl)
        ld      (hl),a
        inc     bc
        ld      a,(bc)
        inc     hl
        adc     a,(hl)
        ld      (hl),a
        dec     bc
        dec     bc
        dec     bc
        ld      a,(bc)
        dec     hl
        dec     hl
        dec     hl
        adc     a,(hl)
        ld      (hl),a
        inc     bc
        ld      a,(bc)
        inc     hl
        adc     a,(hl)
        ld      (hl),a
        jp      lbed5
lba8d:  push    hl
        push    bc
        ld      hl,$0006
        add     hl,sp
        ld      c,(hl)
        inc     hl
        ld      b,(hl)
        inc     hl
        ld      a,(hl)
        inc     hl
        ld      h,(hl)
        ld      l,a
        ld      a,(bc)
        and     (hl)
        ld      (hl),a
        inc     bc
        ld      a,(bc)
        inc     hl
        and     (hl)
        ld      (hl),a
        inc     bc
        ld      a,(bc)
        inc     hl
        and     (hl)
        ld      (hl),a
        inc     bc
        ld      a,(bc)
        inc     hl
        and     (hl)
        ld      (hl),a
        jp      lbed5
lbab0:  push    hl
        push    bc
        ld      hl,l0008
        add     hl,sp
        ld      c,(hl)
        inc     hl
        ld      b,(hl)
        dec     hl
        dec     hl
        dec     hl
        ld      a,(hl)
        inc     hl
        ld      h,(hl)
        ld      l,a
        inc     bc
        inc     bc
        ld      a,(bc)
        inc     hl
        inc     hl
        sub     (hl)
        inc     bc
        ld      a,(bc)
        inc     hl
        sbc     a,(hl)
        dec     bc
        dec     bc
        dec     bc
        ld      a,(bc)
        dec     hl
        dec     hl
        dec     hl
        sbc     a,(hl)
        inc     bc
        ld      a,(bc)
        inc     hl
        sbc     a,(hl)
        jp      lbee4
lbad9:  push    hl
        push    bc
        ld      hl,l0008
        add     hl,sp
        ld      c,(hl)
        inc     hl
        ld      b,(hl)
        dec     hl
        dec     hl
        dec     hl
        ld      a,(hl)
        inc     hl
        ld      h,(hl)
        ld      l,a
        ld      a,(bc)
        cp      (hl)
        jp      nz,lbee4
        inc     bc
        ld      a,(bc)
        inc     hl
        cp      (hl)
        jp      nz,lbee4
        inc     bc
        ld      a,(bc)
        inc     hl
        cp      (hl)
        jp      nz,lbee4
        inc     bc
        ld      a,(bc)
        inc     hl
        cp      (hl)
        jp      lbee4
lbb03:  push    hl
        ld      hl,l0004
        add     hl,sp
        ld      a,(hl)
        inc     hl
        ld      h,(hl)
        ld      l,a
        ld      a,(hl)
        cpl     
        ld      (hl),a
        inc     hl
        ld      a,(hl)
        cpl     
        ld      (hl),a
        inc     hl
        ld      a,(hl)
        cpl     
        ld      (hl),a
        inc     hl
        ld      a,(hl)
        cpl     
        ld      (hl),a
        pop     hl
        ret     

lbb1d:  call    lbc37
        ld      hl,l0008
        add     hl,sp
        ld      c,l
        ld      b,h
        ld      hl,$0014
        add     hl,sp
        ld      a,(hl)
        inc     hl
        ld      h,(hl)
        ld      l,a
        call    lbc4d
        ld      hl,l0000
        add     hl,sp
        ld      c,l
        ld      b,h
        ld      hl,$0016
        add     hl,sp
        ld      a,(hl)
        inc     hl
        ld      h,(hl)
        ld      l,a
        call    lbc4d
        call    lbbd5
        ld      hl,$0016
        add     hl,sp
        ld      c,(hl)
        inc     hl
        ld      b,(hl)
        ld      hl,l0000
        add     hl,sp
        call    lbc7f
        jp      lbc44
        call    lbc37
        ld      hl,l0008
        add     hl,sp
        ld      c,l
        ld      b,h
        ld      hl,$0014
        add     hl,sp
        ld      a,(hl)
        inc     hl
        ld      h,(hl)
        ld      l,a
        call    lbc4d
        ld      e,$00
        ld      hl,l0000
        add     hl,sp
        ld      c,l
        ld      b,h
        ld      hl,$0016
        add     hl,sp
        ld      a,(hl)
        inc     hl
        ld      h,(hl)
lbb79:  ld      l,a
        call    lbc4d
        call    lbbd5
        ld      hl,$0016
        add     hl,sp
        ld      c,(hl)
        inc     hl
        ld      b,(hl)
        ld      hl,l0004
        add     hl,sp
        call    lbc7f
        jp      lbc44
lbb91:  call    lbc37
lbb94:  ld      hl,l0008
        add     hl,sp
        ld      c,l
        ld      b,h
        ld      hl,$0014
        add     hl,sp
        ld      a,(hl)
        inc     hl
        ld      h,(hl)
        ld      l,a
        inc     hl
        call    lbc6d
        ld      hl,l0000
        add     hl,sp
        ld      c,l
        ld      b,h
        ld      hl,$0016
        add     hl,sp
        ld      a,(hl)
        inc     hl
        ld      h,(hl)
        ld      l,a
        inc     hl
        call    lbc6d
        call    lbbd5
        ld      hl,$0016
        add     hl,sp
        ld      c,(hl)
        inc     hl
        ld      b,(hl)
        ld      d,$00
        ld      l,e
        ld      h,d
        add     hl,sp
        call    lbc9f
        jp      lbc44
        call    lbc37
        ld      e,$04
        jp      lbb94
lbbd5:  ld      hl,$0006
        add     hl,sp
        sub     a
        ld      (hl),a
        inc     hl
        ld      (hl),a
        inc     hl
        ld      (hl),a
        inc     hl
        ld      (hl),a
        ld      d,$20
lbbe3:  dec     d
        ret     m

        ld      hl,l0002
        add     hl,sp
        sla     (hl)
        inc     hl
        rl      (hl)
        inc     hl
        rl      (hl)
        inc     hl
        rl      (hl)
        inc     hl
        rl      (hl)
        inc     hl
        rl      (hl)
        inc     hl
        rl      (hl)
        inc     hl
        rl      (hl)
        ld      hl,$0006
        add     hl,sp
        ld      c,l
        ld      b,h
        ld      hl,$000a
        add     hl,sp
        ld      a,(bc)
        sub     (hl)
        inc     bc
        ld      a,(bc)
        inc     hl
        sbc     a,(hl)
        inc     bc
        ld      a,(bc)
        inc     hl
        sbc     a,(hl)
        inc     bc
        ld      a,(bc)
        inc     hl
        sbc     a,(hl)
        jp      c,lbbe3
        ld      (bc),a
        dec     bc
        dec     bc
        dec     bc
        ld      a,(bc)
        dec     hl
        dec     hl
        dec     hl
        sub     (hl)
        ld      (bc),a
        inc     bc
        ld      a,(bc)
        inc     hl
        sbc     a,(hl)
        ld      (bc),a
        inc     bc
        ld      a,(bc)
        inc     hl
        sbc     a,(hl)
        ld      (bc),a
        ld      hl,l0002
        add     hl,sp
        inc     (hl)
        jp      lbbe3
lbc37:  ex      (sp),hl
        push    bc
        push    de
        ex      de,hl
        ld      hl,$fff4
        add     hl,sp
        ld      sp,hl
        ex      de,hl
        ld      e,$00
        jp      (hl)
lbc44:  ld      hl,$000c
        add     hl,sp
        ld      sp,hl
        pop     de
        jp      lbed5
lbc4d:  inc     hl
        ld      a,(hl)
        or      a
        jp      p,lbc6d
        sub     a
        inc     hl
        sub     (hl)
        ld      (bc),a
        ld      a,$00
        inc     hl
        sbc     a,(hl)
        inc     bc
        ld      (bc),a
        ld      a,$00
        dec     hl
        dec     hl
        dec     hl
        sbc     a,(hl)
        inc     bc
        ld      (bc),a
        ld      a,$00
        inc     hl
        sbc     a,(hl)
        inc     bc
        ld      (bc),a
        inc     e
        ret     

lbc6d:  inc     hl
        ld      a,(hl)
        ld      (bc),a
        inc     hl
        ld      a,(hl)
        inc     bc
        ld      (bc),a
        dec     hl
        dec     hl
        dec     hl
        ld      a,(hl)
        inc     bc
        ld      (bc),a
        inc     hl
        ld      a,(hl)
        inc     bc
        ld      (bc),a
        ret     

lbc7f:  ld      a,e
        and     $01
        jp      z,lbc9f
        sub     a
        sub     (hl)
        inc     bc
        inc     bc
        ld      (bc),a
        ld      a,$00
        inc     hl
        sbc     a,(hl)
        inc     bc
        ld      (bc),a
        ld      a,$00
        inc     hl
        sbc     a,(hl)
        dec     bc
        dec     bc
        dec     bc
        ld      (bc),a
        ld      a,$00
        inc     hl
        sbc     a,(hl)
        inc     bc
        ld      (bc),a
        ret     

lbc9f:  ld      a,(hl)
        inc     bc
        inc     bc
        ld      (bc),a
        inc     hl
        ld      a,(hl)
        inc     bc
        ld      (bc),a
        inc     hl
        ld      a,(hl)
        dec     bc
        dec     bc
        dec     bc
        ld      (bc),a
        inc     hl
        ld      a,(hl)
        inc     bc
        ld      (bc),a
        ret     

lbcb2:  push    hl
        push    bc
        ld      hl,$0006
        add     hl,sp
        ld      a,(hl)
        or      a
        jp      p,lbcc2
        neg     
        jp      lbcf0
lbcc2:  jp      z,lbed5
        ld      b,a
        inc     hl
        inc     hl
        ld      a,(hl)
        inc     hl
        ld      h,(hl)
        ld      l,a
        inc     hl
lbccd:  inc     hl
        sla     (hl)
        inc     hl
        rl      (hl)
        dec     hl
        dec     hl
        dec     hl
        rl      (hl)
        inc     hl
        rl      (hl)
        djnz    lbccd                   ; (-$10)
        jp      lbed5
        push    hl
        push    bc
        ld      hl,$0006
        add     hl,sp
        ld      a,(hl)
        or      a
        jp      p,lbcf0
        neg     
        jp      lbcc2
lbcf0:  jp      z,lbed5
        ld      b,a
        inc     hl
        inc     hl
        ld      a,(hl)
        inc     hl
        ld      h,(hl)
        ld      l,a
        inc     hl
        inc     hl
lbcfc:  dec     hl
        sra     (hl)
        dec     hl
        rr      (hl)
        inc     hl
        inc     hl
        inc     hl
        rr      (hl)
        dec     hl
        rr      (hl)
        djnz    lbcfc                   ; (-$10)
        jp      lbed5
lbd0f:  push    hl
        push    bc
        ld      hl,$0006
        add     hl,sp
        ld      a,(hl)
        or      a
        jp      p,lbd1f
        neg     
        jp      lbcc2
lbd1f:  jp      z,lbed5
        ld      b,a
        inc     hl
        inc     hl
        ld      a,(hl)
        inc     hl
        ld      h,(hl)
        ld      l,a
        inc     hl
        inc     hl
lbd2b:  dec     hl
        srl     (hl)
        dec     hl
        rr      (hl)
        inc     hl
        inc     hl
        inc     hl
        rr      (hl)
        dec     hl
        rr      (hl)
        djnz    lbd2b                   ; (-$10)
        jp      lbed5
lbd3e:  push    hl
        push    bc
        push    de
        ld      hl,$000a
        add     hl,sp
        ld      a,(hl)
        inc     hl
        ld      h,(hl)
        ld      l,a
        ld      c,(hl)
        inc     hl
        ld      b,(hl)
        push    bc
        inc     hl
        ld      c,(hl)
        inc     hl
        ld      b,(hl)
        push    bc
        ld      hl,$000c
        add     hl,sp
        ld      a,(hl)
        inc     hl
        ld      h,(hl)
        ld      l,a
        ld      c,(hl)
        inc     hl
        ld      b,(hl)
        push    bc
        inc     hl
        ld      c,(hl)
        inc     hl
        ld      b,(hl)
        push    bc
        ld      hl,l0000
        push    hl
        push    hl
        ld      hl,$0003
        add     hl,sp
        ld      c,l
        ld      b,h
        inc     hl
        ex      de,hl
lbd70:  ex      de,hl
        ld      a,(hl)
        inc     hl
        or      (hl)
        inc     hl
        or      (hl)
        inc     hl
        or      (hl)
        jr      z,lbdb3                 ; (+$39)
        srl     (hl)
        dec     hl
        rr      (hl)
        dec     hl
        rr      (hl)
        dec     hl
        rr      (hl)
        ex      de,hl
        jr      nc,lbda1                ; (+$19)
        ld      hl,l0008
        add     hl,sp
        dec     bc
        dec     bc
        dec     bc
        ld      a,(bc)
        add     a,(hl)
        ld      (bc),a
        inc     bc
        ld      a,(bc)
        inc     hl
        adc     a,(hl)
        ld      (bc),a
        inc     bc
        ld      a,(bc)
        inc     hl
        adc     a,(hl)
        ld      (bc),a
        inc     bc
        ld      a,(bc)
        inc     hl
        adc     a,(hl)
        ld      (bc),a
lbda1:  ld      hl,l0008
        add     hl,sp
        sla     (hl)
        inc     hl
        rl      (hl)
        inc     hl
        rl      (hl)
        inc     hl
        rl      (hl)
        jp      lbd70
lbdb3:  ld      hl,l0002
        add     hl,sp
        ex      de,hl
        ld      hl,$0016
        add     hl,sp
        ld      a,(hl)
        inc     hl
        ld      h,(hl)
        ld      l,a
        ld      a,(de)
        ld      (hl),a
        inc     de
        ld      a,(de)
        inc     hl
        ld      (hl),a
        pop     de
        inc     hl
        ld      (hl),e
        inc     hl
        ld      (hl),d
        ld      hl,$000a
        add     hl,sp
        ld      sp,hl
        pop     de
        jp      lbed5
lbdd4:  push    hl
        push    bc
        ld      hl,$0006
        add     hl,sp
        ld      c,(hl)
        inc     hl
        ld      b,(hl)
        inc     hl
        ld      a,(hl)
        inc     hl
        ld      h,(hl)
        ld      l,a
        ld      a,(bc)
        or      (hl)
        ld      (hl),a
        inc     bc
        ld      a,(bc)
        inc     hl
        or      (hl)
        ld      (hl),a
        inc     bc
        ld      a,(bc)
        inc     hl
        or      (hl)
        ld      (hl),a
        inc     bc
        ld      a,(bc)
        inc     hl
        or      (hl)
        ld      (hl),a
        jp      lbed5
lbdf7:  push    hl
        push    bc
        ld      hl,l0008
        add     hl,sp
        ld      c,(hl)
        inc     hl
        ld      b,(hl)
        dec     hl
        dec     hl
        ld      a,(hl)
        dec     hl
        ld      l,(hl)
        ld      h,a
        inc     bc
        inc     bc
        ld      a,(bc)
        inc     hl
        inc     hl
        sub     (hl)
        ld      (bc),a
        inc     bc
        ld      a,(bc)
        inc     hl
        sbc     a,(hl)
        ld      (bc),a
        dec     bc
        dec     bc
        dec     bc
        ld      a,(bc)
        dec     hl
        dec     hl
        dec     hl
        sbc     a,(hl)
        ld      (bc),a
        inc     bc
        ld      a,(bc)
        inc     hl
        sbc     a,(hl)
        ld      (bc),a
        jp      lbed5
lbe23:  push    hl
        push    bc
        ld      hl,$0006
        add     hl,sp
        ld      c,(hl)
        inc     hl
        ld      b,(hl)
        inc     hl
        ld      a,(hl)
        inc     hl
        ld      h,(hl)
        ld      l,a
        ld      a,(bc)
        xor     (hl)
        ld      (hl),a
        inc     bc
        ld      a,(bc)
        inc     hl
        xor     (hl)
        ld      (hl),a
        inc     bc
        ld      a,(bc)
        inc     hl
        xor     (hl)
        ld      (hl),a
        inc     bc
        ld      a,(bc)
        inc     hl
        xor     (hl)
        ld      (hl),a
        jp      lbed5
lbe46:  push    hl
        push    bc
        push    de
        ld      hl,l0008
        add     hl,sp
        ld      e,(hl)
        inc     hl
        ld      d,(hl)
        inc     hl
        ld      a,(hl)
        inc     hl
        ld      h,(hl)
        ld      l,a
        ex      de,hl
        ldi     
        ldi     
        ldi     
        ldi     
        pop     de
        jp      lbed5
lbe62:  ld      c,l
        pop     hl
        pop     de
        out     (c),e
        jp      (hl)
lbe68:  pop     hl
        push    ix
        ld      ix,l0000
        add     ix,sp
lbe71:  jp      (hl)
lbe72:  ld      sp,ix
        pop     ix
        ret     

lbe77:  pop     de
        ex      (sp),hl
        push    hl
        push    ix
        ld      ix,l0000
        add     ix,sp
        ex      de,hl
        jp      (hl)
lbe84:  ld      sp,ix
        pop     ix
        pop     hl
        pop     af
        jp      (hl)
lbe8b:  ld      sp,ix
        pop     ix
        pop     hl
        pop     af
        pop     af
        jp      (hl)
lbe93:  ld      sp,ix
        pop     ix
        pop     hl
        pop     af
        pop     af
        pop     af
        jp      (hl)
lbe9c:  ld      sp,ix
        pop     ix
        pop     de
        ld      h,$00
        ld      l,a
        add     hl,sp
        ld      sp,hl
        ex      de,hl
        jp      (hl)
        pop     de
        push    ix
        ld      ix,l0000
        add     ix,sp
        ld      hl,($f949)
        push    hl
        ld      hl,($f947)
        push    hl
        ld      hl,($f945)
        push    hl
        ex      de,hl
        jp      (hl)
        ld      de,$fffa
        add     ix,de
        ld      sp,ix
        pop     hl
        ld      ($f945),hl
        pop     hl
        ld      ($f947),hl
        pop     hl
        ld      ($f949),hl
        pop     ix
        ret     

lbed5:  ld      hl,l0004
        add     hl,sp
        ld      c,(hl)
        inc     hl
        ld      b,(hl)
        inc     hl
        ld      (hl),c
        inc     hl
        ld      (hl),b
        pop     bc
        pop     hl
        pop     af
        ret     

lbee4:  push    af
        ld      hl,$0006
        add     hl,sp
        ld      c,(hl)
        inc     hl
        ld      b,(hl)
        inc     hl
        inc     hl
        inc     hl
        ld      (hl),c
        inc     hl
        ld      (hl),b
        pop     bc
        dec     hl
        dec     hl
        dec     hl
        ld      (hl),c
        pop     bc
        pop     hl
        pop     af
        pop     af
        ret     

        call    pe,l4f06
        ld      de,l0000
        ret     pe

        nop     
        nop     
        nop     
        nop     
        nop     
        nop     
        nop     
        nop     
        nop     
        nop     
        nop     
        nop     
        nop     
        nop     
        nop     
        nop     
        nop     
        nop     
        nop     
        nop     
        nop     
        nop     
        nop     
        nop     
        nop     
        nop     
        nop     
        nop     
        nop     
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        rst     $38
        ld      d,l
        exx     
